O(nlgn) time is accepted for this problem?

# O(nlgn) time is accepted for this problem?

It should not be. We were looking for O(n) solution. This just indicates that our test data is weak. Will work on correcting it.

I assume you did a binary search. This gives O(nlogn) time complexity. But the question states less than O(n) space complexity. It is satisfied right. O(1). Why do we need to do it O(n) time complexity then ? I seem to not understand this.

**art1n**#7

I’ve solved this with O(nlogn) using binary search. Please improve tests, or at least add O(n) time constraint to problem statement.