Back to all patterns

Matrix Traversal

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Matrix Traversal pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (1)

Spiral Matrix

Return all elements of m×n matrix in spiral order.

Key Signals:

Track boundariesMove in direction orderShrink boundaries