News for hackers. Stuff that matters.
Re:Puzzle: LgN algorithm for Index == Value by bf on Monday April 13, 2009 @02:04AM (#559469)
Your function crashes when passed an empty vector. Defensive programming please! :-)
Re:Puzzle: LgN algorithm for Index == Value by spaghetti on Monday April 13, 2009 @11:30PM (#560944)
good point. add

    if(v.size() == 0) return false;