Combinations of 2 values in array

前端 未结 0 1067
故里飘歌
故里飘歌 2021-01-17 08:32

i have one array a = [5,3,0,1,7,0] and i want choose 2 elements and do all combinations of their sum.

Example:

get number 3,1:

3 + 1 = 4

(2+2)          


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