public List<Integer> spiralOrderOld(int[][] matrix) {
        int n = matrix.length;
        if (matrix == null || n == 0) return result;
        int m = matrix[0].length;
        if (m == 0) return result;
        set_boundary(n, m);
        goRight(matrix, 0, 0);
        return result;
    }