ServiceNow Interview Question

Printing a matrix in spiral order.