← ALL NOTES
Array

1351. Count Negative Numbers in a Sorted Matrix

A matrix sorted descending along both rows and columns (each row and each column decreases); count the negatives. Because of the double sort, the negatives form a staircase region in the…

Loading…