What is the lookup time complexity of HashSet<T>(IEqualityComparer<T>)?
问题 In C#.NET, I like using HashSets because of their supposed O(1) time complexity for lookups. If I have a large set of data that is going to be queried, I often prefer using a HashSet to a List, since it has this time complexity. What confuses me is the constructor for the HashSet, which takes IEqualityComparer as an argument: http://msdn.microsoft.com/en-us/library/bb359100.aspx In the link above, the remarks note that the "constructor is an O(1) operation," but if this is the case, I am