JAVA || Simple and Easy Solution
PLEASE UPVOTE IF YOU LIKE\n\nclass Solution {\n    public boolean searchMatrix(int[][] matrix, int target) {\n        int n=matrix.length, m=matrix[0].length;\n
PLEASE UPVOTE IF YOU LIKE\n```\nclass Solution {\n    public boolean searchMatrix(int[][] matrix, int target) {\n        int n=matrix.length, m=matrix[0].length;\n        int i=0, j=m-1;\n        while(i<n&&j>=0){\n            if(target==matrix[i][j])\n                return true;\n            if(target>matrix[i][j])\n                i+=1;\n            else\n                j-=1;\n        }\n        return false;\n    }\n}\n```
['Java']