What is the most efficient way to split an array of numbers, such that sum of each subset is as close to a target as possible, without exceeding it?

前端 未结 0 442
长情又很酷
长情又很酷 2021-01-27 18:28

I am faced with this optimization challenge:

Take for example the array, [1, 2, 4, 3, 3, 6, 2, 1, 6, 7, 4, 2]
I want to split this into multiple sub-ar

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