Solution: Search in Sorted Matrix
This review lesson gives a detailed analysis of the solutions to search for a key in a sorted matrix.
Solution #1: Brute force
This is a simple linear search of a 2-D matrix. We use two for loops to iterate over the entire matrix and see if a value equal to the given target is found (lines 3-6).
Time complexity
Since we use two nested for loops, the time complexity is ...