2D Arrays

Arrays inside of arrays aka matrices

When indexing, use row then column.

They are often used to store image data.

Traversal

Have a loop nested inside of another. Outer loop goes through the rows and the inner goes through the columns, or vice verca.

You can use regular for loops or foreach loops, it doesn’t really matter.

Other Notes

For global sorting, make sure to first flatten the array then later to reshape it back.

2D Array Visualization