DEV Community

Discussion on: What is Big-O Notation? Understand Time and Space Complexity in JavaScript.

Collapse
 
nyc4m profile image
Baptiste Prunot

I think you got a mistake in your article,
You should prefer O(log n) to O(n), it's the principle of binary tree 😁

Collapse
 
chandra profile image
Chandra Prakash Tiwari • Edited

Yes, thanks Baptiste for the correction. Please have a look at the graph. I think there is a little difference between the two.