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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.