📌 Python3 simple solution using two pointers
\nclass Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        length1, length2 = len(nums1), len(nums2)\n        i,j = 0,0\n
```\nclass Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        length1, length2 = len(nums1), len(nums2)\n        i,j = 0,0\n        \n        result = 0\n        while i < length1 and j < length2:\n            if nums1[i] > nums2[j]:\n                i+=1\n            else:\n                result = max(result,j-i)\n                j+=1\n            \n        return result\n```
['Two Pointers', 'Python3']