← 💻 Coding & Engineering Craft
Core
Matrix and Grid Simulation Patterns
Grid problems reward a small set of mechanical patterns: walk a spiral by shrinking four boundaries, rotate a square in place with a transpose-then-reverse, and mark state inside the grid itself to keep extra space at O(1). The hard part is index bookkeeping, not algorithms. Interviews probe these because off-by-one errors on boundaries are where most candidates lose points, and in-place tricks test whether you can avoid an obvious extra-memory copy.
a free account unlocks the core curriculum tier · no card
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
Coding & DSARotate an n×n matrix 90 degrees in place.→Coding & DSASpiral Matrix traversal (boundary simulation).→Coding & DSASimulate infection spreading across a 2D grid with multi-source BFS, passing staged test cases.→Coding & DSANumber of Islands: connected components on a grid (flood fill).→Coding & DSASort Colors (Dutch National Flag): three-way partition in one pass.→Coding & DSAMaximal Square: the 2D dynamic programming pattern on a grid.→
COMPANIES THAT ASSUME THIS
