[C++] 2 pointers solution
\tclass Solution {\n\tpublic:\n\t\tint maxDistance(vector& nums1, vector& nums2) {\n\t\t\tint ans = 0;\n\t\t\tint i = 0;\n\t\t\tint j = 0;\n\t\t\twhile(i < nums
\tclass Solution {\n\tpublic:\n\t\tint maxDistance(vector<int>& nums1, vector<int>& nums2) {\n\t\t\tint ans = 0;\n\t\t\tint i = 0;\n\t\t\tint j = 0;\n\t\t\twhile(i < nums1.size() and j < nums2.size()){\n\t\t\t\tif(nums1[i] <= nums2[j]){\n\t\t\t\t\tif(i <= j){\n\t\t\t\t\t\tans = max(ans, j - i);\n\t\t\t\t\t}\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ans;\n\t\t}\n\t};
['Two Pointers', 'C', 'C++']