Maximum summed sub sequences with no two numbers sharing the same digit Suppose there are 5 positive integers in an array or list as 14, 12, 23, 45, 39.

14 and 12 cannot be taken in the subset as 1 is common in both. Similarly {12, 23}, {23, 39}, {14, 45} cannot be included in the same subset.

So the subset which forms the maximum sum is {12, 45, 39}. The maximum sum such formed is 96.

the result should be the maximum sum of such combination.

Sample TestCase 1
Input
3,5,7,2
Output
17

Sample Test Case 2
Input
121,23,3,333,4
Output
458

Sample Test Case 3
Input
32,42,52,62,72,82,92
Output
92

Explanation

Test Case 1: {3, 5, 7, 2} = 17

Test Case 2: {121, 333, 4} = 458

Test Case 3: {92} = 92
05AB1E, 11 bytes

æʒ€ÙJDÙQ}OZ


Try it online!

Explanation

æʒ      }    # filter the powerset of the input, keep only elements
  €Ù         # where each number with duplicate digits removed
    JDÙQ     # have different digits from the other numbers
         O   # sum each
          Z  # take max