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.
This comment is hidden because it contains spoiler information about the solution
maybe you jiu shi ge songstress
This is the quick and dirty way.
I have no idea why this has so many "Best Practice" votes as this is a very very bad practice.
One way to measure how well algorythms handle large inputs is Big-O notation.
The Big-O notation of a given algorythm says how the size of the input relates to the duration of the execution.
This solution has O(n)=n -> the larger n is, the longer it takes.
The ideal solution to this Problem has O(n)=1
This means that it always takes the same amount of time, no matter how large the input is.
This comment is hidden because it contains spoiler information about the solution
But is a solution with no iterations and no second function even better?
I dont know, but here u have it..
You can read other solutions!
Not from a Codewarrior
Is it possible to learn this power?
But do you know what is even better than
number/3
iterations?Yup, that's right: no iterations!
why are you so diao..
Because it's a negligible constant time optimization, doesn't achieve anything ;-)
why not start with 'i = 3'?
This comment is hidden because it contains spoiler information about the solution