Add one delivery center to minimize the worst distance

0
Remix

A grid marks delivery centers with 1 and every other cell with 0. The distance between two cells is max(|x1 - x2|, |y1 - y2|) (moving in all eight directions). The grid's inconvenience is the largest distance from any 0 cell to its nearest center. You may turn at most one 0 into a new center. Return the smallest inconvenience you can reach.

AmazonOnline assessmentLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.