コード例 #1
0
        public static void Main(string[] args)
        {
            // Call Even Number
            EvenNumber evenNumber = new EvenNumber();

            evenNumber.PrintEvenNumber();

            MergeTwoLists mergeTwoList = new MergeTwoLists();

            mergeTwoList.Merge();
        }
コード例 #2
0
        public void MergesListsTest()
        {
            ListNode l1 = CreateListNode(1, 2, 4);
            ListNode l2 = CreateListNode(1, 3, 4);

            var mergedList = MergeTwoLists.Merge(l1, l2).ToList();

            var expected = new List <int>()
            {
                1, 1, 2, 3, 4, 4
            };

            CollectionAssert.AreEqual(expected, mergedList);
        }