Illustration of 20 congruent cubes stacked at various heights. A 3-dimensional representation on a 2-dimensional…