Arrays: Address Calculation and Special Matrices
An array stores elements of one type in consecutive memory locations, so the address of any element can be computed from its indices with a little arithmetic.
Data Structures · topic
Row-major and column-major address formulas for 2-D and 3-D arrays with any lower bounds, reverse problems that recover the base or a dimension from two addresses, triangular, symmetric and tridiagonal storage formulas, sparse matrices in triplet and CSR form, and the shift cost of insertion and deletion.
An array stores elements of one type in consecutive memory locations, so the address of any element can be computed from its indices with a little arithmetic.
One-page visual sheets for this topic, in the sheet library on the store. Previews are free; the full sheets come with the subject pack.