It is better to clarify how to treat duplicated numbers in a set


  • 1
    U

    The example set has two "1"s. In the answer, it is quite clear that the two "1"s are trimmed to only one.
    First, I think if you name it as the mathematical "set", there should be no duplicated numbers. If this could be regarded as a set, then duplicated numbers should be treated as different ones.


  • 0

    The problem starts with "Given a collection of candidate numbers". I got a feeling that was intentional (who writes "collection" unintentionally?), and that the "candidate set" was added by someone else mistakenly. Do you agree that replacing it with "candidate collection" would fix the problem?


  • 0
    U

    @StefanPochmann Yes, I think so. "Collection" is better than "set". Thanks for the clarification.


Log in to reply
 

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