private static boolean backtrack(int[][] maze, Cell end, int y, int x, Deque<Cell> path) {
        // GQ!
        //if (end.equals(path.peek())) {
        if (end.equals(path.peekLast())) {
            return true;
        }
        final int R = maze.length;
        final int C = maze[0].length;
        for (int i = 0; i < DELTA_X.length; i++) {
            int row = y + DELTA_Y[i];
            int col = x + DELTA_X[i];
            if (row < 0 || row >= R || col < 0 || col >= C) {
                continue;
            }
            if (maze[row][col] == BLACK || maze[row][col] == DISCOVERED) {
                continue;
            }
            Cell cell = new Cell(row, col);
            maze[row][col] = DISCOVERED;
            path.addLast(cell);
            if (backtrack(maze, end, row, col, path)) {
                return true;
            }
            path.removeLast();
        }
        return false;
    }