Given an M x N matrix of 0s (empty) and 1s (offices), find the coordinates (r, c) of an empty cell (0) that minimizes the sum of Manhattan distances to all offices (1).
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.