Binary Search to find closest occurrence less than equal to starting point
while ( s <= e ) { int m = ( s + e ) / 2 ; if ( pos [ j ] [ m ] <= start ) { temp = pos [ j ] [ m ] ; s = m + 1 ; } else { e = m - 1 ; } }