Search
⌘K
Get Premium
Leetcode 2852. Sum of Remoteness of All Cells
Given an m×n grid with certain "source" cells, compute each cell's remoteness (minimum distance to the nearest source) and return the sum of those distances — a classic multi-source shortest-path / distance-transform problem typically solved with multi-source BFS or DP on the grid for efficiency.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.