DEV Community

Discussion on: Big-O Notation: Beginners Guide

Collapse
 
metcoder profile image
Carlos Fuentes

Hi! Thanks, I really appreciate it!

Yes, absolutely. If you make your for-loops grows with the same input, you can have something like an array of 4 spots and go through him three, four or five times growing the complexity in something like O(4 3, 4, 5 ...n ).

If you're going in a recursive way, the complexity it doesn't is O(n n ) and becomes exponential.

Collapse
 
mykalcodes profile image
Mykal

awesome!
That makes a tonne of sense! Thanks for the reply 😊

Thread Thread
 
metcoder profile image
Carlos Fuentes

You're welcome. I'm glad to helped you 🙏