(target,index,sub_list)
| 19 | result=[] |
| 20 | candidates.sort() |
| 21 | def helper(target,index,sub_list): |
| 22 | if target==0: |
| 23 | result.append(sub_list) |
| 24 | if target<0 or index>len(candidates): |
| 25 | return |
| 26 | for i in range(index,len(candidates)): |
| 27 | if target<candidates[i]: |
| 28 | break |
| 29 | helper(target-candidates[i],i,sub_list+[candidates[i]]) |
| 30 | helper(target,0,[]) |
| 31 | return result |
nothing calls this directly
no outgoing calls
no test coverage detected