Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I think it's worth mentioning that O(n) and O(2n) are «technically» the same time complexity. Obviously O(2n) is worse than O(n), but in terms of big O notation, they're both linear, so they're the same thing.
"what happens in Vegas stays in Vegas" ... here, not so much
Damm, came back after 2 years
unhinged
yoowww you found my comment after 2 years. I was a dumb and young programmer back then lmaoo
the solution posted is 0(n) time compleity while initilzing max and min in array is 0(n * 2) since you'd be iterating the list twice. Efficiency is not based on length.
Thanks for letting us know, I guess?
very long not efficient
This comment is hidden because it contains spoiler information about the solution