Caterpillar interview question

About Heat Diagram