Two test case gives wrong answer

instead of comparing maze[i][j] with ‘x’ you should compare it with ‘X’ in line 7, because blocks are represented by capital X not small in the input.