60% TC and 67% SC easy python solution using binary search
\ndef maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n\tdef binary(ele, i):\n\t\tj = len(nums2)-1\n\t\twhile(i < j):\n\t\t\tmid = i+(j-i)//2\n\t\
```\ndef maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n\tdef binary(ele, i):\n\t\tj = len(nums2)-1\n\t\twhile(i < j):\n\t\t\tmid = i+(j-i)//2\n\t\t\tif(nums2[mid] >= ele):\n\t\t\t\ti = mid+1\n\t\t\telse:\n\t\t\t\tj = mid-1\n\t\tif(nums2[i] < ele):\n\t\t\treturn i-1\n\t\treturn i\n\tans = 0\n\tfor i in range(len(nums1)):\n\t\tif(i+ans < len(nums2) and nums1[i] <= nums2[i+ans]):\n\t\t\tans = max(ans, binary(nums1[i], i) - i)\n\treturn ans\n```
['Binary Tree', 'Python', 'Python3']