everthis/leetcode-js

287 binary search solution

Closed this issue · 2 comments

It's good to see that you share a lot of JS solutions. Just a quick suggestion. I think the most popular solution for 287 is binary search.

While using binary search, the time complexity of this problem would be O(nlog(n)), which is not better than O(n).

That's true. Thanks!