Cpp || Binary Search
Solving by binary search method\n\nc++\n        int ans = 0;\n        int m = nums1.size(), n = nums2.size();\n        for (int i = 0; i < m; ++i) {\n          
## Solving by binary search method\n\n``` c++\n        int ans = 0;\n        int m = nums1.size(), n = nums2.size();\n        for (int i = 0; i < m; ++i) {\n            int left = i, right = n - 1;\n            while (left < right) {\n                int mid = (left + right + 1) >> 1;\n                if (nums2[mid] >= nums1[i]) {\n                    left = mid;\n                } else {\n                    right = mid - 1;\n                }\n            }\n            ans = max(ans, left - i);\n        }\n        return ans;\n```
['Binary Tree']