static void Main(string[] args) { MyLinkedList list = new MyLinkedList(); list.AddAtHead(1); list.AddAtTail(3); list.AddAtIndex(1, 5); list.DeleteAtIndex(2); Console.WriteLine("Size is " + list.Size()); list.AddAtHead(14); Console.WriteLine("Size is " + list.Size()); list.PrintAllValues(); Console.WriteLine(list.Get(1)); Console.WriteLine("Tail: " + list.getTail().getValue()); Console.WriteLine("Head: " + list.getHead().getValue()); }
static void Main(string[] args) { var list = new MyLinkedList(); list.AddAtHead(7); list.AddAtHead(2); list.AddAtHead(1); list.AddAtIndex(3, 0); list.DeleteAtIndex(2); list.AddAtHead(6); list.AddAtTail(4); Console.WriteLine(list.Get(4)); }