Calculate Combnational Sum using an array
Implement a backtracking algorithm Given a collection of amount values (A) and a target sum (S), find all unique combination A where the amount values sum up to S. Return these combinations in the form of a list. Each amount value may be used only the number of times it occurs in list A. The solution should not contain duplicate combinations. Amounts will be positive numbers. Return an empty list if no possible solution exists. Example: A = [11,1,3,2,6,1,5]; Target Sum = 8 Result = [[3, 5], [2, 6], [1, 2, 5], [1, 1, 6]]