you give nonincrease 0indexed integer array nums1 nums2A pair indice j 0 nums1length 0 j nums2length valid j nums1i nums2j the distance pair j iReturn maximum distance valid pair j if valid pair return 0an array arr nonincrease arri1 arri 1 arrlength Example 1input nums1 5530542 nums2 1002010105output 2explanation the valid pair 00 22 23 24 33 34 44the maximum distance 2 pair 24example 2input nums1 222 nums2 10101output 1explanation the valid pair 00 01 11the maximum distance 1 pair 01example 3input nums1 3029195 nums2 2525252525output 2explanation the valid pair 22 23 24 33 34the maximum distance 2 pair 24 Constraints1 nums1length nums2length 1051 nums1i nums2j 105both nums1 nums2 nonincreasing