Your for loop doesn't make any sense in the context of the algorithm. You're not iterating over the array - you're leapfrogging over portions of it. The key observation is that the value of "i" is irrelevant in the loop body. Unless you just want to do something N times, this is a sign that something is amiss.
Binary Search Help Repost.
Started by Sid_TheBeginner, Jun 28 2012 11:40 PM
22 replies to this topic






