Braze Interview Question

They asked me to implement a spiral matrix algorithm.