Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3251. Find the Count of Monotonic Pairs II
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.