C++ Easy Solution
class Solution {\npublic:\n    int maxDistance(vector& nums1, vector& nums2) {\n        int i=0,j=0,s,s1;\n        s=nums1.size();\n        s1=nums2.size();\n  
class Solution {\npublic:\n    int maxDistance(vector<int>& nums1, vector<int>& nums2) {\n        int i=0,j=0,s,s1;\n        s=nums1.size();\n        s1=nums2.size();\n        int max1=0;\n        while(i<s && j<s1)\n        {\n            if(nums1[i]>nums2[j])\n                i++;\n            else\n            {\n                max1=max(max1,j-i);\n                j++;\n            }\n        }\n        return max1;\n    }\n};
['C']