lower_bound ( ) Returns pointer to the first element greater than or equal to arr [ i ]
arr [ i ] = lower_bound ( temp , 0 , n , arr [ i ] ) + 1 ; } } function lower_bound ( a , low , high , element ) { while ( low < high ) { let middle = low + Math . floor ( ( high - low ) / 2 ) ; if ( element > a [ middle ] ) low = middle + 1 ; else high = middle ; } return low ; }