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.
+1 Clever Point for checking perfect squre differently than multiplying with the same number.
This comment is hidden because it contains spoiler information about the solution
I massively overcomplicated this, as I misinterpretted the problem.
We know intuitively what each node's value will be - if we need to step forwards 5 steps, we know what the next value will be.
We do not need to visit each node, and step over them one at a time.
The problem I've solved here, is having a ring of people's names, which you can't know in advanced, because they're not sequential and predictable.
But also an array might have been better anyway. Only problem with an array is the performance cost assosciated with removing at a random location, compared with linked list.
this was mine. Really quite inefficient (lots of removing from start of array). But working with strings like this has also got to be suboptimal. Should've probably broken into a few more functions. But it does the job, in a semi-readable way. But took ages, lots of googling to understand how base64 actually works. Interesting though! Enjoyed this
You're performing the Math.sqrt(sq) function twice, it would have been better to put that into a variable. Just to save yourself from calculating it twice. Clean solution though.
Thanks, I will check it