大家抓紧着啊,下周最后一周了 (转载)# Joke - 肚皮舞运动
t*h
1 楼
Write a function that takes in an array of integers and outputs the number
of ways you can combine those integers to obtain a sum of 15.
Example: for [10,5,3,2], output = 2.
我只想到用递归 生成所有结果
如果等于15就把计数器加一
careercup上说可以用DP来做 但是我想不到
请问这个问题用DP怎么做?
of ways you can combine those integers to obtain a sum of 15.
Example: for [10,5,3,2], output = 2.
我只想到用递归 生成所有结果
如果等于15就把计数器加一
careercup上说可以用DP来做 但是我想不到
请问这个问题用DP怎么做?