ClassLink interview question

Spiral Matrix medium leet code question