The point: A well implemented binary search is O(logN) worst case, but averages O(logN - 1).
But, in order to accommodate duplicates, you are forced to recind the possibility of early discovery, which forces the average case to the worst case. Eg. The complexity changes!
In reply to Re^8: Modified Binary Search
by BrowserUk
in thread Modified Binary Search
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |