1 points · by heythisisom · 9y ago · 6 comments
EDIT: Each point {pi} is unique.
The big O for (log n + c) is O(log n).
However, you can do better by memoizing the search to get O(1) speed in exchange for O(n) space. But that's probably not in keeping with the parameters of the exercise.