✅Python Easy O(n+m) Two Pointer Apporach
UPVOTE PLS :-)\n\n\nclass Solution:\n    def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:\n        i=0\n        j=len(matrix[0])-1\n       
**UPVOTE PLS :-)**\n\n```\nclass Solution:\n    def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:\n        i=0\n        j=len(matrix[0])-1\n        while(i<len(matrix) and j>=0):\n            if target<matrix[i][j]:\n                j-=1\n            elif target>matrix[i][j]:\n                i+=1\n            else:\n                return True\n        return False\n```
['Python']