||Beats 99%|| very easy java solution using two pointers ||
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int maxDistance(int[] nums1, int[] nums2) {\n        int max=0;\n        int i=0,j=0;\n        while(i<nums1.length && j<nums2.length)\n        {\n            if(nums1[i]>nums2[j])\n                i++;\n            else\n                max=Math.max(max,j++-i);\n            \n        }\n        return max;\n    }\n}\n```
['Two Pointers', 'Java']