Updated Linked List and updated
This commit is contained in:
@ -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();
|
Reference in New Issue
Block a user