static void Main(string[] args) { //testing a list of int values and getting the minimum value var list = new LinkedListLibrary.LinkedList <string>(); // create List container // create data to store in List // use List insert methods list.InsertAtFront("z"); // adding the first element or node list.InsertAtFront("b"); // adding the first element or node list.InsertAtFront("x"); // adding the first element or node list.InsertAtFront("a"); // adding the first element or node list.Display(); Console.WriteLine($"Minimum: {list.Minimum()}"); // testing a list of double values and getting the last element on queue var doubleList = new LinkedListLibrary.LinkedList <int>(); // create List container // create data to store in List // use List insert methods doubleList.InsertAtFront(4); // adding the first element or node doubleList.InsertAtFront(3); // adding the first element or node doubleList.InsertAtFront(7); // adding the first element or node doubleList.InsertAtFront(9); // adding the first element or node Console.WriteLine(""); doubleList.Display(); Console.WriteLine($"Last Element: {doubleList.GetLast()}"); }
static void Main(string[] args) { var list = new LinkedListLibrary.LinkedList <int>(); // create List container // create data to store in List // use List insert methods list.InsertAtFront(11); // adding the first element or node list.InsertAtFront(14); // adding the first element or node list.InsertAtBack(1); // adding the last element or node list.InsertAtFront(3); // adding the first element or node list.Display(); list.RemoveFromFront(); //remove the first element list.RemoveFromBack(); //remove the last element list.Display(); }