how to add values in array until sum equals certain value

前端 未结 0 780
北恋
北恋 2021-01-23 15:02

I have an array that has list of values. I would like to find the positions that sum up to a certain values. The value I am looking for is 7

[1,2,3,5,2,6]

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