Searching an ordered list is going to be O(log n) or worse.If that were true, finding an item in an array would take logarithmic time (this thread has already established arrays are sorted). It doesn't of course, given the key, it takes constant time to find something in an array.
Just because binary search on a list of sorted values is logarithmic doesn't mean any search is logarithmic.
In reply to Re^4: What makes an array sorted and a hash unsorted?
by JavaFan
in thread What makes an array sorted and a hash unsorted?
by ikegami
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |