What are advantages of Sorted Arrays?

Technology CommunityCategory: ArraysWhat are advantages of Sorted Arrays?
VietMX Staff asked 3 years ago

Realistically, a sorted array would be advantageous if you want to get a sorted listing of items, or do a ranged search or anything except an exact match. If all you’re doing is searching onesie twosie, the hash table is conceptually faster. In practice the array and a binary search may be faster due to caching though.