Functional Array
The *functional array* of an array $A = [A_1, A_2, \dots, A_N]$ is the array $fA$ of size $N-1$, where $fA_i = A_{i+1} - A_i$ for $1\leq i \lt N$. For example, if $A = [2, 3, 9, 11]$ then $fA = [1, 6, 2]$. You are given two arrays $B = [B_1, B_2, \dots, B_N]$ and $Z = [Z_1, Z_2, \dots, Z_M]$ of length $N$ and $M$ respectively. Find out whether there exists an array $A$ such that: - $B$ is a [subs
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start