Ad
  • Default User Avatar

    It should be failling because the comparation of null values with true

  • Default User Avatar

    Dont know but in my opinion is needed to create a multidimentional array of (21 * 21)
    and to place the person in the center of this matrix [11][11].

    After place the person in the position it will be neede to create a mechanism that
    executes the displacement of the person in the array taking in account the next steps:

    1. Each time the user moves one step to north it will have to move ([i-1][j]).
    2. Each time the user moves one step to south it will have to move ([i+1][j]).
    3. Each time the user moves one step to east it will have to move ([i][j+1]).
    4. Each time the user moves one step to west it will have to move ([i][j-1]).

    at the end of the execution if the person is on the [11][11] array position, it
    will be compliant with the expected behavior.

  • Custom User Avatar

    I checked the tests, and that praticular test is definitey expecting your function to return false.
    maybe you're not returning properly or reading the logs wrong.

  • Custom User Avatar

    [ 'n', 'w', 'n', 'w', 'n', 'w', 'n', 'w', 'n', 'w' ] does not like false. Please explain why I am getting value not expected when I return false.

  • Custom User Avatar

    There is no such test. All test cases that don't take you back to the start expect false.

  • Custom User Avatar

    There is a submission test case that does not take you back to start however will not accept false. I cannot find any edge cases in the Details section. Please explain where a walk that never returns from n and w directions should be true.

  • Default User Avatar

    Is this wanting to us build a graph where you know the initial position, in order to validate if
    is a valid walkthrought, did you miss something in the enunciate?.