private static void TestAgainstComplexInput(IDisjointSetUnion<int> disjointSetUnion)
        {
            Assert.AreEqual(0, disjointSetUnion.Find(0));
            Assert.AreEqual(1, disjointSetUnion.Find(1));
            Assert.AreEqual(2, disjointSetUnion.Find(2));
            Assert.AreEqual(3, disjointSetUnion.Find(3));
            Assert.AreEqual(4, disjointSetUnion.Find(4));

            disjointSetUnion.Union(0, 4);
            disjointSetUnion.Union(1, 3);

            Assert.AreEqual(disjointSetUnion.Find(4), disjointSetUnion.Find(0));
            Assert.AreEqual(disjointSetUnion.Find(3), disjointSetUnion.Find(1));
            Assert.AreEqual(2, disjointSetUnion.Find(2));
        }
        private static void TestAgainstComplexInput(IDisjointSetUnion <int> disjointSetUnion)
        {
            Assert.AreEqual(0, disjointSetUnion.Find(0));
            Assert.AreEqual(1, disjointSetUnion.Find(1));
            Assert.AreEqual(2, disjointSetUnion.Find(2));
            Assert.AreEqual(3, disjointSetUnion.Find(3));
            Assert.AreEqual(4, disjointSetUnion.Find(4));

            disjointSetUnion.Union(0, 4);
            disjointSetUnion.Union(1, 3);

            Assert.AreEqual(disjointSetUnion.Find(4), disjointSetUnion.Find(0));
            Assert.AreEqual(disjointSetUnion.Find(3), disjointSetUnion.Find(1));
            Assert.AreEqual(2, disjointSetUnion.Find(2));
        }