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.
That makes a tonne of sense! Thanks for the reply 😊
You're welcome. I'm glad to helped you 🙏
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.