C# easy & works
\npublic class Solution {\n    public bool SearchMatrix(int[][] matrix, int target) {\n        \n        int row = 0;\n        int col = matrix[0].Length-1;\n  
```\npublic class Solution {\n    public bool SearchMatrix(int[][] matrix, int target) {\n        \n        int row = 0;\n        int col = matrix[0].Length-1;\n        \n        while(row < matrix.Length && col >= 0){\n            if(matrix[row][col] == target){\n                return true;\n            } else if(target < matrix[row][col]){\n                col--;\n            } else {\n                row++;\n            }\n        }\n        \n        return false;\n    }\n}\n```
[]