Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • This comment is hidden because it contains spoiler information about the solution

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

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

  • At least in Python there are no test cases for a pawn moving two units after its initial move.

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

  • I wonder if the existing solutions grouping algorithms could be repurposed for cheat detection. After finishing a kata, I often find that the top solution is part of a group. Now I don't know how clever the solutions grouping algorithm is, and certainly in simple katas people will inevitably come up with near-identical solutions. But in complex katas the likelihood of two people coming up with such identical solutions should be astronomically small, not to even mention larger groupings.

    The far more likely explanation is that people copy-paste existing solutions; either that, or a complete misestimation on my part about the workings of solutions grouping. In the former case, it would be trivial to send an automated alert to a moderator or the kata's sensei, who could then decide whether the similarities were coincidental. (For simpler katas such alert system could be disabled, as duplicates will arise naturally.)

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

  • The paths are directly from one letter to another in a straight line. I think of it as 'Blocking' letters, for example E is blocking the path from A to I. If you think about the problem it makes sense because if you tried to move your finger from A to I and had not visited E yet, your finger would move over E and trigger it as the next node. For example if you do count_patterns_from('A', 1) and try to do A->I with your finger, you'll run into E and end up with A->E. The problem does mention this at least now:

    Take into account that dots/points can only be connected with straight directed lines ...

  • Hm, I did test this against the JS solution and the result you get is correct. I'll see if I can contact the person who created the translation (I don't know R myself).

  • OK, thanks. I thought that the retracing rule implies we can slide our finger from A to I through the previously visited D. So is the retracing rule limited to "geometrically direct" retracings (such as from A to G through D)? If so, this is not stated in the description.

  • Let's say from your first node (D) you go to (A). From there you have 5 choices, not 7 (B, F, E, H, G).

  • I don't understand the test case count_patterns_from("D", 3) == 37.

    Starting from node "D", we can choose seven following nodes, as only node "F" is blocked from "D". From any follow-up node, using the retracing rule, we can reach any other node, for a total of seven further follow-ups.

    This totals up to 7x7 = 49 paths, which is greater than the reference 37. Am I getting the rules wrong?

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

  • R version is currently broken. It states "Caution: This kata does not currently have any known supported versions for R. It may not be completable due to dependencies on out-dated libraries/language versions."

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

  • Loading more items...