← Sandvine questions

Spiral order traversal of 2D matrix

Filed under Sandvine

The question

Given a 2D matrix, traverse and return all elements in spiral order.

No write-up yet. Related questions below have one.

Related Sandvine questions

Collected from public candidate posts and coding forums. Updated Nov 2026.