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