示例#1
0
        public static void InsertSortedListMain()
        {
            var list = ListBuilder.Create(new[] { 2, 5, 7, 10, 15 });

            var inserted = InsertValue(list, 16);

            ListBuilder.Dump(inserted);
        }
示例#2
0
        public static void ReverseListMain()
        {
            var list = ListBuilder.Create(new[] { 1, 2, 3 }); //1    3->2->null

            var reverse = Reverse(list);
        }
示例#3
0
        public static void LinkedListReversalMain()
        {
            var reversed = Reverse(ListBuilder.Create(new[] { 1, 2, 3, 4, 5 }));

            ListBuilder.Dump(reversed);
        }