Question
A hospital floor is mapped as a grid where each cell holds the number of patient interactions logged in that zone this week. Facilities wants to place a supply station covering an h-by-w block of zones (h rows by w columns, axis-aligned) where the block's total interactions are highest. Given the non-empty grid and integers h and w (guaranteed to fit inside the grid), return the maximum block total. Cell values may be negative for closed zones. Example: grid = [[1, 2, 3], [4, 5, 6]], h = 1, w = 2 gives 11.
busiest_block(grid: list[list[int]], h: int, w: int) → int[[[1,2,3],[4,5,6]],1,2]out11State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.