wrong test results


  • 0
    T

    in the case of
    [2,3,6,7,2]
    7

    the test result is
    [[2,2,3],[2,2,3],[2,2,3],[7]]

    Duplicates show up in the answer

    The right answer would be [[2,2,3],[7]]


  • 0
    L

    I found this, too.
    Actually, the only different from combination-sum-I and combination-sum-II should be unlimited number of each character for(combination-sum-I).

    All the other code should be the same.
    Combination-sum-II has the right test sets.


  • 0
    S

    The input should be a set. [2,3,6,7,2] is not a set.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.