You are viewing a single comment's thread. Return to all comments →
It's not that it's in O(n) time, but you don't need to sort. I think the final result can be, at the least, O(n^2).
Seems like cookies are disabled on this browser, please enable them to open this website
Running Time of Algorithms
You are viewing a single comment's thread. Return to all comments →
It's not that it's in O(n) time, but you don't need to sort. I think the final result can be, at the least, O(n^2).