Mindstix Software Labs interview question

Iterate and print 2D array in spiral form in one loop