HashSet that preserves ordering
Standard .NET HashSet do not preserve the insertion order. For simple tests the insertion order may be preserved due to an accident, but it’s not guaranteed and would not always work that way. To prove that it is enough to do some removals in between. See this question for more information on that: Does HashSet … Read more