DataStructuresCSharp/C#/Program.cs

36 lines
609 B
C#
Raw Normal View History

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
DoublyLinkedList<int> list = new DoublyLinkedList<int>();
2022-03-04 08:45:53 +00:00
list.Add(1);
list.Add(2);
list.Add(3);
list.Add(4);
list.Add(5);
list.Add(6);
list.Add(7);
list.Add(8);
2022-03-04 08:45:53 +00:00
DoublyLinkedList<int> list2 = new DoublyLinkedList<int>();
list2.Add(1);
list2.Add(2);
list2.Add(3);
list2.Add(4);
list2.Add(5);
list2.Add(6);
list2.Add(7);
list2.Add(8);
var list3 = DoublyLinkedList<int>.Create(list, null);
var x = list[-6];
2022-03-04 08:45:53 +00:00
Console.WriteLine(x);
2022-03-04 08:45:53 +00:00