Пример #1
0
        public void RandomInverseTreapTest()
        {
            IInverseIntTreap <int> fst = new InverseIntTreap <int>();
            IInverseIntTreap <int> snd = new TrivialImplementIInverseIntTreap();

            GenerateTreap(fst, 42);
            GenerateTreap(snd, 42);

            Assert.That(EqInverseTreap(fst, snd));
        }
Пример #2
0
        public void Test()
        {
            InverseIntTreap <int> treap = new InverseIntTreap <int>();

            for (int i = 0; i < 100; i++)
            {
                treap.Insert(i, i);
            }

            for (int i = 0; i < 100; i++)
            {
                Assert.AreEqual(treap.GetInverse(i), i);
            }
        }