def test_combination_sum_bottom_up(self): self.assertEqual(combination_sum_bottom_up([1, 2, 3], 4), 7)
from algorithms.dp import combination_sum_topdown, combination_sum_bottom_up nums = [1, 2, 3] target = 4 print(combination_sum_topdown(nums, 4)) print(combination_sum_bottom_up(nums, 4)) # 6/15 박제준