Skip to content

Implement an optimized recursive function how_sum(target_sum, numbers) that takes in target_sum and an array of numbers as arguments. #18

@SchattenMonarch

Description

@SchattenMonarch

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions