You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function should return an array containing any combination of elements that add up to exactly the targetSum. If there is no combination that adds up to the target_sum, then return null.
If there are multiple combinations, return any of those.
Use memoization to improve the time complexity of the brute-force approach from issue #17