Tag: bestsum

BestSum Solution in Java

Problem Statement Write a function ‘bestSum(targetSum, numbers)’ that takes in a targetSum and an array of numbers as arguments. The function should return an array containing the shortest combination of numbers that add up to exactly targetSum. If there is a tie for the shortest combination, you may return any one of the shortest. Solution