Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    For those stuck on final tests, console.logging the input field helps to visualize the layouts. Simple but oft forgotten.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    For those stuck, try brushing up on nested reducers and / or using recursion.

  • Custom User Avatar

    For those stuck, i found it helpful to visualize whats happening with a pen and paper.

  • Custom User Avatar

    Great exercise to sharpen the sort() skills.

  • Custom User Avatar

    This kata may throw you off if you are not used to Big O challenges. Just keep in mind, solution shouldn't be any longer than O(n) and, if you've been stuck for a long time, you are probably overthinking it. The solution to your 1200 ms timeout is much simpler than you may perceive. GL

  • Custom User Avatar

    for those struggling, i feel ya. If you need a hint, look up Kadane's algorithm.

  • Custom User Avatar

    your pompous nature is unwelcomed.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution