예제 #1
0
        public void Test2()
        {
            var list   = AlgoUtilities.Utilities.ToSingleLinkedList(new int[] { 1, 1, 2, 2, 3, 4, 3, 4 });
            var finder = new FindFirstNonRepeatingIntegerInLinkedList();

            Assert.That(finder.firstNonRepeating(list), Is.Null);
        }
예제 #2
0
        public void Test1()
        {
            var list   = AlgoUtilities.Utilities.ToSingleLinkedList(new int[] { 10, 20, 30, 10, 20, 40, 30 });
            var finder = new FindFirstNonRepeatingIntegerInLinkedList();

            Assert.That(finder.firstNonRepeating(list), Is.EqualTo(40));
        }