Skip to content

Commit b0fba81

Browse files
refactor 1314
1 parent 94ba1eb commit b0fba81

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_1314.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
/**
7-
* 1314. Matrix Block Sum
8-
*
9-
* Given a m * n matrix mat and an integer K,
10-
* return a matrix answer where each answer[i][j] is the sum of all elements
11-
* mat[r][c] for i - K <= r <= i + K, j - K <= c <= j + K, and (r, c) is a valid position in the matrix.
12-
*
13-
* Example 1:
14-
* Input: mat = [[1,2,3],[4,5,6],[7,8,9]], K = 1
15-
* Output: [[12,21,16],[27,45,33],[24,39,28]]
16-
*
17-
* Example 2:
18-
* Input: mat = [[1,2,3],[4,5,6],[7,8,9]], K = 2
19-
* Output: [[45,45,45],[45,45,45],[45,45,45]]
20-
*
21-
* Constraints:
22-
* m == mat.length
23-
* n == mat[i].length
24-
* 1 <= m, n, K <= 100
25-
* 1 <= mat[i][j] <= 100
26-
* */
276
public class _1314 {
287
public static class Solution1 {
298
public int[][] matrixBlockSum(int[][] mat, int K) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy