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.
very clear and concise.
If the underlaying datastructure is an array, all remaining elements have to be moved in memory one element to the left. So that the second element now is the first, and so on.
Not sure if that is the case for Python, but it is like that for a Rust
Vec
or a C++vector
for example.I didn't know about [::-1] I was using arr.reverse() but in 2D arrays that just mirrors vertically. Really cool 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.
thank you, your scritp so good
a method to rotate 2D list based on zip
Thank you for this!
So elegant. A great example to us learners - thank you.
Loading more items...