O(nlogn) got accepted


#1

A simple binary search based O(nlogn) solution was getting accepted. Please look into it.
Thanks.