Available question text
Given two non-increasing arrays, find the maximum index distance j - i for a pair (i, j) with i <= j and nums1[i] <= nums2[j]; the monotonicity of both arrays lets you efficiently search valid pairs (e.g., via two pointers or binary search) for lengths up to 1e5.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1855. Maximum Distance Between a Pair of Values
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source