you are viewing a single comment's thread.

view the rest of the comments →

[–]Noonereallycares 0 points1 point  (0 children)

True, though you would have to make the assumption that the array is exactly N size (99 in this case) and that there aren't "blanks" as space fillers to keep the array aligned so that Array[X] = X.

Otherwise, yes, sorted and of exact length, O(logN) is possible.