Solved! Leetcode 1351. Count Negative Numbers in a Sorted Matrix

source: https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/description/ Count Negative Numbers in a Sorted Matrix Table of ContentsCount Negative Numbers in a Sorted MatrixDescriptionExample 1:Example 2:Constraints:SolutionFollow up Description Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid. Example 1: Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]]Output: 8Explanation: There ...