Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
So why couldn't we just use a built in sort for a question like this? Is it beca...

Luke Samuel

Jul 20, 2022

So why couldn't we just use a built in sort for a question like this? Is it because that's restricted in this problem?

0

0

Comments
Comments
E
Euler 3 years ago

It's not as efficient. It will have a time complexity of O(NlogN) instead O(N) and possibly take O(N) space for the sort.

On this page