Hmmmmm…
I do hate weak test cases.
1 Like
But I love them if I get AC due to it 
2 Likes
Me as well.
Can we do it using binary search ? Total time complexity would be n logn. I thought of this but was too lazy to implement.