C Sharp (C#) - Collections
You have a list of integers with duplicates:
Which code snippet correctly creates a
List<int> nums = new List<int> {1, 2, 2, 3, 4, 4, 4, 5};Which code snippet correctly creates a
HashSet<int> containing only the unique elements from nums?