public int[][] generateMatrixOld(int n) {
        int[][] matrix = new int[n][n];
        if (n == 0)
            return matrix;
        generateMatrixAux(matrix, 0, 0, 1, 1, n);
        return matrix;
    }