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

0% completed

Vote For New Content
So, time complexity is it O(N^2) or N(logN)?

Erick Aky

Oct 22, 2022

So, time complexity is it O(N^2) or N(logN)?

0

0

Comments
Comments
E
Erick Aky3 years ago

Did I understand correctly that N(logN) happens only in balanced tree?

Design Gurus
Design Gurus3 years ago

Yes, the worst case is O(N^2), but the average case would be O(N logN).

On this page