public static void main(String args[]) {
        SpiralGeneration sg = new SpiralGeneration();
        int[][] r = sg.generateMatrix(4);
        for (int i = 0; i < r.length; i++) {
            for (int j = 0; j < r[i].length; j++) {
                System.out.print(r[i][j] + " ");
            }
            System.out.println();
        }
    }
Date 07/31/2016
@author Tushar Roy

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.

https://leetcode.com/problems/spiral-matrix-ii/
src/com/interview/multiarray/SpiralGeneration.java