Updated Linked List and updated

This commit is contained in:
2022-03-04 16:58:31 +00:00
parent 8165bb849b
commit 00f52ee5c7
5 changed files with 78 additions and 68 deletions

View File

@ -1,16 +1,17 @@
using System;
using C_.Datastructures;
using C_.Datastructures.Nodes;
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
LinkedList<int> list = new LinkedList<int>();
LinkedList<int> list = new();
list.Append(1);
list.Append(2);
list.Append(3);
LinkedList<int> list2 = new LinkedList<int>();
LinkedList<int> list2 = new();
list2.Append(1);
list2.Append(2);
@ -19,7 +20,7 @@ list2.Append(3);
LinkedList<int> list3 = LinkedList<int>.Create(list, list2);
int x = list3[5] = 5;
list3.Insert(4, 1);
list3.Delete(0);
list3.Head = LinkedListNode<int>.Create(5, null);
Console.ReadLine();