Source: https://www3.cs.stonybrook.edu/~pfodor/courses/CSE114/L08-MultiDimensionalArrays.pdf