You are given an array of integers original of length bounds of length bounds[i] = [u_i, v_i] represents the inclusive range of values copy[i] can take.
An array copy of length original if both of the following conditions are satisfied:
bounds[i][0] copy[i] bounds[i][1] for every
copy[i] - copy[i - 1] is equal to original[i] - original[i - 1] for every
Return the total number of possible copy arrays.
Constraints:
original.length
original[i]
bounds.length
bounds[i].length
bounds[i][0] bounds[i][1]
You are given an array of integers original of length bounds of length bounds[i] = [u_i, v_i] represents the inclusive range of values copy[i] can take.
An array copy of length original if both of the following conditions are satisfied:
bounds[i][0] copy[i] bounds[i][1] for every
copy[i] - copy[i - 1] is equal to original[i] - original[i - 1] for every
Return the total number of possible copy arrays.
Constraints:
original.length
original[i]
bounds.length
bounds[i].length
bounds[i][0] bounds[i][1]