Amazon Interview Question

print the elements in a n by n 2d array in a spiral shape