Microsoft interview question

Write a program to print array in spiral order .