Microsoft interview question

Print a 2D array in spiral order