https://leetcode.com/problems/search-a-2d-matrix-ii


Runtime: 10 ms, faster than 17.71% of Java online submissions for Search a 2D Matrix II.
Memory Usage: 44.6 MB, less than 69.92% of Java online submissions for Search a 2D Matrix II.


```java
class Solution {
    public boolean searchMatrix(int[][] matrix, int target) {
        //8:21
        for (int[] row : matrix) {
            for (int value : row) {
                if (target == value) {
                    return true;
                }
            }
        }
        return false;
        //8:22
    }
}
```