Castle on the Grid

  • + 0 comments

    If you're getting results that seem correct but don't match the expected results (e.g., 1 rather than 3 for sample test 0), it's probably because x and y are not fully specified in the problem description, and you have them reversed. The first row of input is the column x=0 rather than the row y=0. You can swap the X and Y argument names in the minimumMoves function to resolve it.