Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Compute time to infect all cells
Coding · Graphs · Grids & Matrices
- Find All Combinations of Bag Sizes That Sum to a Target Capacity
Coding
- Find the Sum of the Power of All Subsequences
Coding
- Find X-Sum of All K-Long Subarrays I
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2852. Sum of Remoteness of All Cells
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source