#Created a binary search function but its only returning me -1 instead of the middleIndex

2 messages · Page 1 of 1 (latest)

ripe vigil
#

Very new to the syntax of everything, trying to get a grasp on it. I can understand what the function is doing and what its supposed to do, but im confused

empty inlet
#

Assume an ordered array, start at the middle. If the target is smaller, go left (max is the old middle - 1), else go right (min is the old middle +1)