Possible Original List
Every List of n integers has its Sum List whose entries are all the possible sums of two different entries in the original List. List => x1, x2, ... xn Sum List => x1+x2, x1+x3, ... ,x2+x3, x2+x4 ..., xn-1+xn List => 1, 2, 3, 4 Sum List => 3, 4, 5, 5, 6, 7 List of length n has Sum List of length n (n - 1) / 2 The goal is to find all possible original Lists given the Sum List and the length of the original List Sum List => 1269, 1160, 1663 length of original List => 3 possible original List => 383, 777, 886 Sum List => 226, 223, 225, 224, 227, 229, 228, 226, 225, 227 length of original List => 5 possible original List => 111, 112, 113, 114, 115 How would you approach this? --------------------------------------------- My approach is here: https://code.sololearn.com/W0edzR3D8MkH/?ref=app