You are viewing a single comment's thread. Return to all comments →
It's impossible to solve this in O(n). You sorted the input - that's O(n log n).
Seems like cookies are disabled on this browser, please enable them to open this website
Jesse and Cookies
You are viewing a single comment's thread. Return to all comments →
It's impossible to solve this in O(n). You sorted the input - that's O(n log n).