Python Binary Solution Shortest
```class Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        distance = 0\n        \n        for i in range(len(nums1)):\n
```class Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        distance = 0\n        \n        for i in range(len(nums1)):\n            start = i\n            end = len(nums2)-1\n            while start<= end:\n                mid = (start+end)//2\n\t\t\t\t\n                if nums2[mid] < nums1[i]:\n                    end = mid-1\n                else:\n                    start = mid+1\n            distance = max(distance, end -i)\n            \n        return distance
['Binary Tree', 'Python']