Draft

Through the Maze

Description
Loading description...
Arrays
Strings
  • Please sign in or sign up to leave a comment.
  • trashy_incel Avatar

    Very rarely, the random tests will generate mazes with no possible exit path, e.g.

    [ [ '_', '_', '_', '_', '_' ],
      [ '_', 'W', 'W', 'W', 'W' ],
      [ 'W', 'W', 'W', 'W', '_' ],
      [ '_', '_', '_', '_', 'x' ],
      [ 'W', 'W', 'W', 'W', 'W' ] ]
    

    which isn't supposed to happen.

    nice kata tho :)

  • YOEL311 Avatar

    Inspections are disqualified for no reason I burned for three hours

  • Blind4Basics Avatar

    duplicate

  • B1ts Avatar

    Seems very much a duplicate of other existing maze katas. Values array seems totally unnecessary. When I messed up values format, it gave me some cryptic message and didn't really help at all.

  • and800 Avatar

    This comment has been hidden.

  • and800 Avatar

    Hit the time limit, seems challenging :D

  • dinglemouse Avatar

    Most tests were working OK but some test cases were failing for me with weird errors. It took a very long time to work out that it was not my code, but rather the test verification which did not like me dropping breadcrumbs into the original maze matrix. Please fix the test code or document this restriction.

    (Maybe same issue as the myjinxin2015 comment)

  • myjinxin2015 Avatar

    A little bug in random test, the maze array generation maybe use the Wrong clone mode, some lines are used to replicate the generation of other lines, so if you directly modify the maze array data in these line ,They will change together.

  • Katbow Avatar

    I am unsure of the purpose of keeping track of values. The only valid option is an array full of '_' ending with 'x'. Is it to double check the number of steps people used? If that is the case, I think returning it as just a number is more clear. Putting '_' repeatedly into an array seems redundant otherwise, and doesn't add much to the real problem of finding the path.

    Very good kata though, really has me thinking!

  • andrewMacmurray Avatar

    Hey franzmoro88, I'm almost there with my solution but I keep failing with these tests:

    Looks like you hit a wall! Restarting level.
    Never got to x
    Found the x more than once.
    Found the x but kept moving and collecting cells afterwards.
    

    But my path array is:

    [[0,0],[0,1],[0,2],[1,2],[2,2],[3,2],[4,2],[4,3],[4,4],[4,5]]

    And my values are:

    ["_","_","_","_","_","_","_","_","_","x"]

    As far as I know this seems like a valid solution. Are the tests only against the first maze (the one in the description) or are there others? When I log the output from maze I only get the maze from the description.

  • tasnim Avatar

    Hi franzmoro88, I noticed how in some of your random tests i'll get an error saying the path array should not start from [0,0]. But in the tests prior to the random tests it will say path array should start from [0,0]. Maybe have a look at these errors?