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.
Yep, seconding this, I don't know if we are expected to put on the riddle solver hat on in order to understand that Matryoshka Dolls is also a key part of making it make sense inside of the logic of comparing lists and finding a criteria in order to iterate them. But I personally just feel as though the instructions are extremely unclear.
I believe it's fixed, but it's difficult to tell the difference.
I believe there's a typo in the formatting of the description?
0000 Start at 0
0011 Switch bits 1,2
0101 Switch bits 2,3
0110 Switch bits 1,2
1001 Switch all 4 bits
1010 Switch bits 1,21100 Switch bits 2,3
1111 Switch bits 1,2
Should be:
0000 Start at 0
0011 Switch bits 1,2
0101 Switch bits 2,3
0110 Switch bits 1,2
1001 Switch all 4 bits
1010 Switch bits 1,2
1100 Switch bits 2,3
1111 Switch bits 1,2
Correct?
OP solved it, closing
+1 to this, I'm pretty sure that an optimal path for it can be less than 4 steps.
and what do you make of
[5, 4, 3, 5]
? it's separate from the other twoThis comment is hidden because it contains spoiler information about the solution
You have a bug in your code that's not a kata issue. Look again at the last two lines of your code.
There are issues with the description or with js tests, but they're already posted below.
Javascript version needs a revision, literally the exact same value that is to be expected is being printed out but the assertion is marking it as a fail. Frustrating to say the least. Even looking at the other solutions just brings more questions.