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.
Thanks! It is confusing but you explain it clearly!
No, it is actually more confusing than that!
The first time array.pop(0) is executed the array variable is still bound to the input argument.
But after that, the array variable is rebound to a new list, and therefore no longer mutates the input argument.
So, the input array is changed after the function, but only with its first row removed.
This comment is hidden because it contains spoiler information about the solution
incredible view! thank you!
very clear and concise.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
why?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Impressive solution, I must say... ;)
thank you for making me discover the zip function
Thank you! Good work!
amazing
If some of you are interested, discarding multiples of 2 and 3 (i think), we only have to look up for primes in 6i + 1 and 6i + 5, or starting an interation from 5 , 6i and 6i + 2 (i and i +2, step by 6). Meaning we would only look up numbers like 5, 7, 11, 13, 17, 19, 23, 25 (see, some of them would still not be prime).
Overall this reduce the iteration to a third.
Loading more items...