<p>You are given two <strong>non-increasing 0-indexed </strong>integer arrays <code>nums1</code> and <code>nums2</code>.</p>
<p>A pair of indices <code>(i, j)</code>, where <code>0 <= i < nums1.length</code> and <code>0 <= j < nums2.length</code>, is <strong>valid</strong> if both <code>i <= j</code> and <code>nums1[i] <= nums2[j]</code>. The <strong>distance</strong> of the pair is <code>j - i</code>.</p>
<p>Return <em>the <strong>maximum distance</strong> of any <strong>valid</strong> pair </em><code>(i, j)</code><em>. If there are no valid pairs, return </em><code>0</code>.</p>
<p>An array <code>arr</code> is <strong>non-increasing</strong> if <code>arr[i-1] >= arr[i]</code> for every <code>1 <= i < arr.length</code>.</p>