public int[][] generateMatrix(int n) {
    	
    	int[][] result = null;
    	if(n == 0) return new int[0][0];
    	if(n == 1){
    		result = new int[1][1];
    		result[0][0] = 1;
    		
    		return result;
    	}
    	
        result = new int[n][n];
        
        int step = 1;
        
        travel(result, step, RIGHT, 0, 0);
        
        return result;
    }