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.
True!
Try to google "multiple assignment".
Or read https://stackabuse.com/unpacking-in-python-beyond-parallel-assignment/ for a more in depth explanation.
Also for
(-1, 1)[n<1]
,n<1
will be evaluated as a boolean, True is equivalent to 1 and False to 0, so it could be translated as.
.
Fixed.
Since you ask to handle "a sequence of any type", it is definitely not trivial in JavaScript.
I would rank it 6th Kyu because you have to know about advanced language features.
Glad you managed it. I've just merged in a Javascript translation if you want to try that. :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It is because you mutate the arguments and op didnt make a copy of the args when using his function to compare. He needs to json.parse and json.stringify