News for hackers. Stuff that matters.
Re:Puzzle: LgN algorithm for Index == Value by dangoldin on Saturday April 11, 2009 @11:23PM (#558117)
Given that the list is sorted you can just modify the basic binary search to do what your want. Choose the middle and then compare the index with the value - depending on the relationship look to the left or right and repeat.

There are no comments on this comment yet.