Problem 2624 · Medium

Snail Traversal

Fill a rows-by-columns matrix from a flat array column by column, alternating down and up, or return an empty list when the sizes do not match.

Open the interactive visualisation