In the world of programming write code as today is your last day on earth is not the main thing in the art of programming. Beyond understand what's...
For further actions, you may consider blocking this person and/or reporting abuse
I love this post. Very useful. Thanks Carlos!
Thanks for your words. I love to help! Greetings :)!
Wonderfully written!
One suggestion - Next time when you describe something which involves writing code codes, don't use the screenshots, written code is more useful than the screenshots.
Thank You!
True, sorry about that. Thanks for your suggestion, I'll do it in the next article! 😁
Awesome Post! Really helped my general understanding of Big O. that said, I did have a question regarding the O(n2) definition.
If you have a function that has 3 nested for loops, as opposed to 2 (as you have in your example) does the complexity then become O(n3)? I can't seem to see anything online that would say so...
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.
awesome!
That makes a tonne of sense! Thanks for the reply 😊
You're welcome. I'm glad to helped you 🙏
awesome !
Good post :)
Would the exponential example not be 100, 200, (...400), 800 though?
Yes, sure!
Sorry, my bad. I'll fix it, thanks! ;)
No problem...did want to post back though since I saw the article was updated.
In the example you laid out, I think an algorithm running in O(2^n) time would be more like this:
10 items - 100s
11 items - 200s
(12 items - not listed - 400s)
13 items - 800s
Just wanted to point it out, since the typo makes the algorithm sound more performant than it really is.
Thanks, this post really helped me alot!
You're welcome. It's good to help!
Very well put!
Thanks a lot Carlos!
Fantastic Topic
What a super clear description.
Thank's. I appreciate :)
Thanks, this post really helped me a lot!
A good read. Thank you.
Thank you for this post!
You're welcome. Is good to know I'm helping others!
Great post
Thank you. I appreciate! :)