Remove Duplicates from a String in c#
I/P - programming
O/P - progamin
HashSet: This is a collection that stores unique items. If you try to add an item that already exists in the HashSet, it won't be added again. This is useful for keeping track of which characters we've already seen.
StringBuilder: This is a class that helps in building strings efficiently. It allows us to append characters one by one without creating multiple string instances.