Find all possible original Arrays using given Difference Array and range of array elements
Given an array arr[] of size N that contains the differences between the adjacents elements of an array. The task is to generate all possible arrays such that all the elements of the array lie in the range [L, R]. Examples: Input: arr[] = {1, -3, 4}, L = 1, R = 6Output: {3, 4, 1, 5}, {4, 5, 2, 6}Exp