Problem 3248 · Easy

Snake in Matrix

Track the row and column while applying each command, then encode the final cell as row times n plus column.

Open the interactive visualisation