示例#1
0
        static void TestMergeSortedList()
        {
            int[]    nums1 = new[] { 1, 2, 4 }, nums2 = new[] { 1, 3, 4 };
            ListNode l1 = ListUtil.BuildList(nums1), l2 = ListUtil.BuildList(nums2);
            var      ret = MergeSortedLists.MergeTwoLists(l1, l2);

            ret = MergeSortedLists.Solution2(l1, l2);
        }
示例#2
0
 static void TestAddTwoNumbers()
 {
     int[]    nums1 = new[] { 1, 8 }, nums2 = new[] { 0 };
     ListNode l1 = ListUtil.BuildList(nums1), l2 = ListUtil.BuildList(nums2);
     var      ret = AddTwoNumbers.AddTwoNumbersSolution(l1, l2);
 }
示例#3
0
 static void RemoveDuipSL()
 {
     int[]    nums1 = new[] { 4, 2, 3 };
     ListNode ln    = ListUtil.BuildList(nums1);
     var      ret   = RemoveDuplicatesfromSortedList.DeleteDuplicates(ln);
 }