@@ -0,0 +1,1448 @@
+/**%0A * Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:%0A * Integers in each row are sorted from left to right.%0A * The first integer of each row is greater than the last integer of the previous row.%0A * @author Jun%0A *%0A */%0Apublic class Solution %7B%0A    public boolean searchMatrix(int%5B%5D%5B%5D matrix, int target) %7B%0A        if(matrix == null %7C%7C matrix.length == 0)    return false;%0A        int row = matrix.length;%0A        int col = matrix%5B0%5D.length;%0A        if(target %3C matrix%5B0%5D%5B0%5D %7C%7C target %3E matrix%5Brow - 1%5D%5Bcol - 1%5D)%0A            return false;%0A        // find the row%0A        int low = 0, high = row - 1;%0A        int mid = 0, midValue = 0;%0A        while(low %3C= high) %7B%0A            mid = low + (high - low) / 2;%0A            midValue = matrix%5Bmid%5D%5B0%5D;%0A            if(midValue %3E target)%0A                high = mid - 1;%0A            else if(midValue %3C target)%0A                low = mid + 1;%0A            else%0A                return true;%0A        %7D%0A        row = target %3C midValue ? mid - 1 : mid;%0A        // find the column%0A        low = 0; high = col - 1; %0A        while(low %3C= high) %7B%0A            mid = low + (high - low) / 2;%0A            midValue = matrix%5Brow%5D%5Bmid%5D;%0A            if(midValue %3E target)%0A                high = mid - 1;%0A            else if(midValue %3C target)%0A                low = mid + 1;%0A            else%0A                return true;%0A        %7D%0A        return false;%0A    %7D%0A%7D%0A

Create 074.java