4 kyu

Simple maze

776 of 1,042eugene-katsevman
Description
Loading description...
Queues
Recursion
Algorithms
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar
  • ahmet_popaj Avatar

    Very nice one, compliments for the kata, well done.

  • LS2008 Avatar

    A very satisfying kata, thanks!

  • Ciprian Amza Avatar

    Very interesting kata. It wasn't clear at all that a non-rectangle maze may have extra escaping ropes, but it makes total sense!

  • Goga_09 Avatar

    Can someone give me a hint or something, please

  • Harleigh Avatar

    Exquisite Kata! I always wanted to write a maze solver! Very Fun! Thank you eugene-katsevman!

  • dawidszewczyk Avatar

    This comment has been hidden.

  • dshonz Avatar

    My code passed all the sample tests then passed 99 of the test suite cases with 11 failed when I attempted it. Then 103 cases with 7 failed when I attempted it again with no changes to the code. How would I go about checking the errors when the test suite code is not available for me to debug my failed test cases against? Also why would the number of passed cases and failed cases change with no change to the code?

  • nadasa Avatar

    This comment has been hidden.

  • AJGM-cg Avatar

    Firstly, thank you for this great challenge. It was fun!

    I believe the instructions should be clarified. Saying the maze does not have to be a rectangle is not clear. It could mean either that you should treat blank spaces (e.g. last two chars in the last row, which has 8 columns where the others had 10) as walls or that you should treat them as edges where you've succeeded in escaping. I interpret it the first way, which caused me some confusion. Effectively, the maze always is a rectangle, it's just not always given as such in the input data. You have to extrapolate it into a rectangle.

    My suggestion would be to say something like, "The maze input is not always a rectangle. Any spaces not defined by the input should be treated as open spaces (not walls)."

  • induhiu Avatar

    Awesome kata! I enjoyed it so much

  • Etoneja Avatar

    Very pleasant kata: not very hard and lots of fun!

  • Tigerhub779 Avatar

    Good KATA:) boost my knowledge about reccursion

  • MattZ306 Avatar

    You could add a test case where there is no Kate. I realized that I missed this edge case after seeing a solution that didn't, yet I passed the kata.

  • jerson Avatar

    Genial kata ♥I love you♥

  • JorgeVS Avatar

    Though not Kata related, this Kata shows up in my profile under /Kata/Completed. I can't see the Solutions of the Kata however. If I resubmit my solution, do I get points again? I guess it's a CW bug, but is there an accepted way of handling this?

  • Blind4Basics Avatar

    python: the "jagged maze" test should be done with the reversed version too: some implementations may use the length of the first string as a constant, and that will make succeed that test where it would fail on the other version:

    maze = ["###########",
            "#k        #",
            "#########"]
    
  • Blind4Basics Avatar

    java translation, please review and approve.

    cheers

    Note: I added the reversed jagged maze test and updated the description about that kind of maze.

  • FArekkusu Avatar
    maze = ["#########",
            "#k        #",
            "###########"]
    

    The description should mention that the maze may not be a rectangle.

  • theDarkBright Avatar

    This comment has been hidden.

  • acker241 Avatar

    Great Kata! Working really hard to solve this. Managed to go through Sample cases but my code times out when I run. What kind of sizes of mazes we are talking about ?

  • iv2101 Avatar

    What kind of exception is needed to satisfy this part of the description:

    There should be only one Kate in a maze. In any other case you have to raise an exception.

    The tester doesn't accept errors/exceptions I raise...

  • iv2101 Avatar

    Hi there! Exceptions are not my forte - what is meant by "raise an expection if there is more than one Kate"? This doesn't do it:

    if not sum(m.count('k') for m in maze) == 1: raise Exception("There should no be multiple Kates")
    

    Thank you!

  • Voile Avatar

    Python 3 support?