2022-03-04 08:45:53 +00:00
|
|
|
|
using System;
|
|
|
|
|
using C_.Datastructures;
|
2022-03-04 16:58:31 +00:00
|
|
|
|
using C_.Datastructures.Nodes;
|
2022-03-04 08:45:53 +00:00
|
|
|
|
|
|
|
|
|
// See https://aka.ms/new-console-template for more information
|
2022-03-03 08:05:41 +00:00
|
|
|
|
Console.WriteLine("Hello, World!");
|
2022-03-04 08:45:53 +00:00
|
|
|
|
|
2022-03-04 16:58:31 +00:00
|
|
|
|
LinkedList<int> list = new();
|
2022-03-04 08:45:53 +00:00
|
|
|
|
|
2022-03-04 10:10:55 +00:00
|
|
|
|
list.Append(1);
|
|
|
|
|
list.Append(2);
|
|
|
|
|
list.Append(3);
|
2022-03-04 08:45:53 +00:00
|
|
|
|
|
2022-03-04 16:58:31 +00:00
|
|
|
|
LinkedList<int> list2 = new();
|
2022-03-04 08:45:53 +00:00
|
|
|
|
|
2022-03-04 10:10:55 +00:00
|
|
|
|
list2.Append(1);
|
|
|
|
|
list2.Append(2);
|
|
|
|
|
list2.Append(3);
|
2022-03-04 08:45:53 +00:00
|
|
|
|
|
|
|
|
|
|
2022-03-04 10:10:55 +00:00
|
|
|
|
LinkedList<int> list3 = LinkedList<int>.Create(list, list2);
|
|
|
|
|
|
2022-03-04 10:49:08 +00:00
|
|
|
|
list3.Insert(4, 1);
|
|
|
|
|
list3.Delete(0);
|
2022-03-04 16:58:31 +00:00
|
|
|
|
list3.Head = LinkedListNode<int>.Create(5, null);
|
2022-03-04 08:45:53 +00:00
|
|
|
|
Console.ReadLine();
|