Traverse an m×n matrix in spiral order. Master the boundary-shrinking technique — maintain top, bottom, left, right walls and peel layer by layer. Covers edge cases, visual dry run, common bugs, Python & JavaScript solutions, and follow-ups like Spiral Matrix II.
Learn how to rotate an n×n matrix 90° clockwise in-place using the elegant transpose-then-reverse trick. Understand the math behind it, see the 4-cell direct rotation alternative, dry-run through a worked example, avoid the four most common mistakes, and get clean Python + JavaScript solutions.
Search for a target in a matrix where each row and column is sorted. O(m+n) solution using top-right corner elimination — a classic Google interview problem.
Calculate how much water can be trapped in a 3D height matrix. Uses a min-heap BFS starting from the boundary, always processing the lowest border cell to determine water trapped inside.