Available question text
Count the number of pairs of non-negative integer arrays (arr1, arr2) of length n with arr1 non-decreasing, arr2 non-increasing, and arr1[i]+arr2[i]=nums[i] for all i — equivalently, count non-decreasing sequences a[i] with 0 ≤ a[i] ≤ nums[i] such that nums[i]-a[i] is non-increasing. Return the total count modulo 10^9+7 (n ≤ 2000, nums[i] ≤ 1000).
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 3251. Find the Count of Monotonic Pairs II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source