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.
This ^^
I wrote the rails out using 4 rails, gives you all the insights. For decoding I used the same strategy, but i was able to use patterns from the encoding code.
Those were really helpful resources, especially the vid - thanks for the share :)
thanks mate : )
For those stuck, do not forget to draw the rails out. Example's string at rails 8+ may be tricky to decode, depending on the algo. Once passed unit tests, I found the edge cases' decoding strings confusing to read, so i generated my own (google rail fence cipher crypto corner).
for decoding, break it down. and reverse engineer. start with the rails (arrays) needed. then lengths of each rail. for my process, lots of shifting and pushing.
For those stuck on final tests, console.logging the input field helps to visualize the layouts. Simple but oft forgotten.
Thanks so much
You are a true friend.
My apologies. What i wrote was confusing. In my approach, you do not compare y and z from the same x, because—like you mentioned—z will always be greater than y.
But y is > than z per different indices.
You say to compare Y and Z in each iteration? Z is always greater than Y, so what do you mean by comparing?
This comment is hidden because it contains spoiler information about the solution
For those stuck, try brushing up on nested reducers and / or using recursion.
This comment is hidden because it contains spoiler information about the solution
For those stuck, i found it helpful to visualize whats happening with a pen and paper.
Great exercise to sharpen the sort() skills.
Loading more items...