TLE for Python But same code complexity passes in Java


#1

Found Pivot and then did the BS