D
Deleted member 1940
Guest
Implement a function called walker(x) that, given a list x of N numbers [x(0), x(1), x(2),..., x(N-1)], outputs a "walk list" y = [y(0), y(1),..., y(N)], defined recursively as:
y(0) = 0,
y(n) = y(n-1) + x(n-1), if 0 < n <= N
y(0) = 0,
y(n) = y(n-1) + x(n-1), if 0 < n <= N