January 2012
Intermediate to advanced
396 pages
8h 16m
English
Sometimes we need to check whether two collections contain the same element or not. However, that's a quadratic time operation at the least and .NET doesn't have any method to check that directly. Although you can convert any collection to a .NET set implementation and then do such a check. But that would be computationally expensive.
However, the DisjointSets() method does that. It considers each collection as a set and returns false if they have the same elements in any order; and true otherwise. Think of this method as the complementary method to the
EqualCollections() method.
Read now
Unlock full access