Google·Software Engineer·Technical Phone Screen
- You're given a 2D grid where each cell has a number. Partition the grid into non-overlapping 3x3 blocks. Each block's representative is its minimum value. Find the block with the globally smallest representative and return it (plus optionally its coordinates). Walk through the O(m*n) scan and any pruning you can think of.
“I started with the brute force scan, which is just iterating every cell, grouping by block index (row/3, col/3), tracking the min per block, then comparing across blocks.”