Available question text
Compute the total sum of pairwise Manhattan distances over all ways to place k identical pieces on an m×n grid (one per cell), modulo 1e9+7. The core challenge is combinatorial counting: for each pair of cells count how many arrangements include that pair (choose the other k−2 cells) and exploit that Manhattan distance separates into independent row and column contributions to aggregate efficiently.
Related questions
Continue with questions that share topics or the same question type.
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 3426. Manhattan Distances of All Arrangements of Pieces
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source