Skip to content
Leetcode
Esc
↑↓navigate↵open⌘Jpreview

Matrix Index Math

A two-dimensional grid is read as a flat array through a formula, and the neighbors are found by arithmetic.

Last updated on September 24, 2026

Was this page helpful?