96% Faster | O(n^2) |  Easy Solution✅
Code\n\nclass Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        m, n = len(nums1), len(nums2)\n        res = 0\n        
# Code\n```\nclass Solution:\n    def maxDistance(self, nums1: List[int], nums2: List[int]) -> int:\n        m, n = len(nums1), len(nums2)\n        res = 0\n        j = 0\n        for i in range(m):\n            while j < n and nums1[i] <= nums2[j]:\n                j += 1\n            res = max(res, j - 1 - i)\n        return res\n```
['Binary Search', 'Iterator', 'Python3']