C++ solution
\tclass Solution {\n\tpublic:\n    int maxDistance(vector& nums1, vector& nums2) {\n        int i = 0, j = 0, ans = 0;\n        \n        while(i<nums1.size() &
\tclass Solution {\n\tpublic:\n    int maxDistance(vector<int>& nums1, vector<int>& nums2) {\n        int i = 0, j = 0, ans = 0;\n        \n        while(i<nums1.size() && j < nums2.size()){\n            if(nums1[i] > nums2[j])\n                i++;\n            else\n                ans = max(ans, j++ - i);\n        }\n        return ans;\n      }\n\t};\n\n
['C', 'C++']