Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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! Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^8: Modified Binary Search
by BrowserUk
|
|