# 28.12.2025 [1351. Count Negative Numbers in a Sorted Matrix]

# 28.12.2025 [1351. Count Negative Numbers in a Sorted Matrix]

28.12.2025 [1351. Count Negative Numbers in a Sorted Matrix](https://leetcode.com/problems/count-n...) easy [blog post](https://leetcode.com/problems/count-n...) [substack](https://dmitriisamoilenko.substack.co...) [youtube](   • # 28.12.2025 [1351. Count Negative Numbers...  ) ![6740ea68-029c-43e8-a7e2-f5ebb31cbb30 (1).webp](https://assets.leetcode.com/users/ima...) #### Join me on Telegram https://t.me/leetcode_daily_unstoppab... #### Problem TLDR Count negatives in 2D sorted matrix #easy #### Intuition Brute force. Improve with either: binary search n+m walk on border of negatives #### Approach use list.binarySearch {..} in Kotlin or partition_point in Rust #### Complexity Time complexity: $$O(nlogm)$$ Space complexity: $$O(nm)$$ #### Code https://dmitrysamoylenko.com/2023/07/...