java solution 100% beats
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public boolean searchMatrix(int[][] arr, int t) {\n        if(arr==null || arr.length<1 || arr[0].length <1) return false;\n        int r=0;\n        int c=arr[0].length-1;\n        while(c>=0 && r <=arr.length-1){\n            if(t==arr[r][c]) return true;\n            else if(t<arr[r][c]) c--;\n            else if(t> arr[r][c]) r++;\n        }\n        return false;\n    }\n}\n```
['Java']