Most Squares Covering One Grid Cell

Asked at Google · Coding Questions · Difficulty: Medium · Last asked Aug 24, 2026

A map is drawn as an `n x n` grid of unit cells, and many square areas are placed on it, for example the coverage zones of sensors or the footprints of planned sites. Squares can overlap. Find the cell that the largest number of squares cover at the same time, and return how many squares cover it.

Loading the problem…