Pau*_*ina 13 algorithm recursion line
我一直想知道是否有可能以递归或"分而治之"的方式解决这个问题.这是我的问题的可视化:

Input:
22 // point no 1
35 // point no 2
5 // ...
44
45
20
46
Output: 2 // point with number 2 has got the lowest sum (87)
Run Code Online (Sandbox Code Playgroud)
我知道如何以迭代的方式做到这一点,但我正在考虑更优化的事情.