Available question text
Given an m×n matrix and integer k, compute for each cell the sum of all elements inside the (2k+1)×(2k+1) square centered at that cell, clipped to matrix boundaries. The core challenge is computing all these sliding block sums efficiently (typically via a 2D prefix-sum / summed-area table to get each block sum in O(1) after O(mn) preprocessing).
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 1314. Matrix Block Sum
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source