Ad
  • Custom User Avatar

    You need to count how many squares / blocks you are going to walk. Therefore, the matrix must have exactly 10 values.
    The second point is that when you go, you need to go back, so if you walk in one direction, you need to go back the same number of times.