Check recursive if list includes sum of int

前端 未结 0 556
走了就别回头了
走了就别回头了 2020-12-10 00:18

my Goal is to create a recursive Function to checks if a list contains the sum of an integer:

sum_possible([1,2,3,4,5],12)

should return [1,2

相关标签:
回答
  • 消灭零回复
提交回复
热议问题