When we call the Contains() method on HashSet, the time it takes is O(1). Can anyone let me know how much time will be taken by LINQ Where clause on HashSet? Will it same O(1) or it would iterate through all data?
eg... HashSet hashData = new HashSet(){"a","b","c","d"};
Here, hashData.Contains() will take O(1) time.
What about this:?
hashData.Where(c => c.Equals("a"))