Microsoft interview question

Traverse an array in a spiral