Introduction
A HashSet helps you keep a collection of items where each item appears only once. It automatically ignores duplicates.
When you want to store a list of unique names without repeats.
When you need to check quickly if an item is already in a collection.
When you want to remove duplicate values from a list.
When you want to combine two lists but keep only unique items.
When you want to count how many different items you have.