I'm really only looking for pseudo code here.
I'm trying to write a binary search algo which finds the location of a value in a series of values (or the location of where a value should be in a series when the value doesn't exist).
I'm getting hung up on rounding when the amount of values in a series is odd. I'm not sure if I should round up, down or both or one way in some cases or another in another.
Example data: 1,2,3,5,6,7,8
Need to correctly return location for '4', '7', '9'.