Ad
  • Custom User Avatar

    python (probably others too): one of the following should be part of the final fixed tests:

    • A1-B2
    • A8-B7
    • H1-G2
    • H8-G7

    Otherwise some incomplete solution can pass.

  • Custom User Avatar

    Done by OP

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Pretty challenging kata, keep it up.

  • Custom User Avatar

    A portion of arr in random tests should be tested instead of full array to avoid solutions like this

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar
  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Default User Avatar

    the more i understand python and enter the solution page,
    the more i am amazed thinking how wonderful human brains are!!!
    and become curious why people feels threatened by A.I.?!

    Nice kata!

  • Custom User Avatar

    b7 -> d6 -> c8, 2 moves. Not a kata issue.

  • Custom User Avatar

    (C++ solution)
    Randomized_Fixed_Tests:
    b7 -> c8
    Expected: equal to 2
    Actual: 4

    How is it possible?

  • Default User Avatar

    @modernLifeRock - Hi; at first I thought you were making a silly mistake but your solution is really interesting so I ended up debugging on my IDE.

    I think your mistake is due to you introducing another argument to the function, and it seems that the tests then keep the data_structure_that_you_have_used between tests. I'm not 100% sure, because the Python tests themselves are a bit out-of-date so I don't completely understand how they are being run.

    Long story short - try this to see if it works:

    1. replace cache_sq= XYZ (where XYZ is the data structure you are using) in your function's arguments with cache_sq = None

    2. then, inside your function as the first base case, put if cache_sq is None: cache_sq = XYZ where XYZ is the (empty) data structure you are using

    I'm using XYZ to avoid having to spoiler my comment - otherwise you won't be able to see it until you have solved the kata.

  • Custom User Avatar

    get a similar problem with my python implementation. Did you ever figure out what the problem wa?

  • Default User Avatar

    My (python) solution works on about 100-200 test cases but fails the rest. When I take an example failed test and put try it on my IDE, it works. Anyone know why this might be the case?

  • Custom User Avatar

    Loved the variety in the solutions. I went straight for the "general" approach I'm most familiar with and solved the kata quickly, and did not think of a better solution for this particular case. Good lesson learnt.

  • Loading more items...