Python Solution- Simple -2 Pointer
\nclass Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        max_diff = 0\n        i = 0\n        j = 0\n        while i<le
```\nclass Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        max_diff = 0\n        i = 0\n        j = 0\n        while i<len(nums1) and j <len(nums2):\n            if i <= j:\n                if nums1[i] <= nums2[j]:\n                    max_diff=max(max_diff,j-i)\n                    j += 1\n                else:\n                    i += 1\n            else:\n                j += 1\n        return max_diff\n        \n```
['Python', 'Python3']