test unsorted and sorted vector space