- Search vertically for rows that have the potential to hold the target value using binary search
- check if the target is not in the matrix vertically then return false
- Look for the target in the line that has been found
time complexity:
O(log(m*n))
- Search vertically for rows that have the potential to hold the target value using binary search
- check if the target is not in the matrix vertically then return false
- Look for the target in the line that has been found
time complexity:
O(log(m*n))
We can solve this problem by checking the values one by one in the 2-dimensional matrix
time complexity:
O(n^2)
We can solve this problem by checking the values one by one in the 2-dimensional matrix
time complexity:
O(n^2)