Leetcode 3468. Find the Number of Copy Arrays
Count how many arrays copy of length n satisfy copy[i]-copy[i-1]=original[i]-original[i-1] and per-index bounds, noting that once you fix copy[0] the whole array is determined by prefix offsets. Equivalently, compute those offsets and count the integer values x for copy[0] that lie in the intersection of intervals [bounds[i].low - offset[i], bounds[i].high - offset[i]] for all i.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.