CodePudding user response:
1. Generate a random number, thrown into the HashTable;2. Generate a random number, throw in a List, and then to heavy with Distinct;
3. Generate a random number, if the target List does not include the number, the random number added;
4. Dictionary
CodePudding user response:
Can say the application scenario?CodePudding user response:
See how much you need to generate to generate an ordered array, after the order is a one out there will not be repeated,