Problem 2326 · Medium

Spiral Matrix IV

Walk the rings of the matrix clockwise from the outside in, writing list values along the spiral and filling the rest with minus one.

Open the interactive visualisation