Skip to content

Commit e5f2a69

Browse files
refactor 1351
1 parent f4ce5b3 commit e5f2a69

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

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

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1351. Count Negative Numbers in a Sorted Matrix
5-
*
6-
* Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise.
7-
* Return the number of negative numbers in grid.
8-
*
9-
* Example 1:
10-
* Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]]
11-
* Output: 8
12-
* Explanation: There are 8 negatives number in the matrix.
13-
*
14-
* Example 2:
15-
* Input: grid = [[3,2],[1,0]]
16-
* Output: 0
17-
*
18-
* Example 3:
19-
* Input: grid = [[1,-1],[-1,-1]]
20-
* Output: 3
21-
*
22-
* Example 4:
23-
* Input: grid = [[-1]]
24-
* Output: 1
25-
*
26-
* Constraints:
27-
* m == grid.length
28-
* n == grid[i].length
29-
* 1 <= m, n <= 100
30-
* -100 <= grid[i][j] <= 100
31-
* */
323
public class _1351 {
334
public static class Solution1 {
345
public int countNegatives(int[][] grid) {

0 commit comments

Comments
 (0)