Picking Numbers

  • + 0 comments

    Problem: [1 ,2, 2, 3, 1, 2] Incorrect: Subsets [1,2,2,3] and [1,2] My output: 4 Expected output: 5

    Correct: because 3 doesn't fullfil condition to be in the same set as number 1 sorted: [1,1,2, 2, 2,3] Subsets [1,1,2,2,2] and [3] My output: 5 Expected output: 5