106 lines
1.4 KiB
C#
106 lines
1.4 KiB
C#
using System;
|
|
|
|
// See https://aka.ms/new-console-template for more information
|
|
Console.WriteLine("Hello, World!");
|
|
|
|
|
|
//LinkedList<int> list = new LinkedList<int>();
|
|
|
|
//list.Append(1);
|
|
//list.Append(2);
|
|
//list.Append(3);
|
|
//list.Append(4);
|
|
//list.Append(5);
|
|
//list.Append(6);
|
|
|
|
//list.Delete(5);
|
|
//list.Delete(2);
|
|
//list.Delete(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// DoublyLinkedList<int> list = new DoublyLinkedList<int>();
|
|
|
|
// list.Append(1);
|
|
// list.Append(2);
|
|
// list.Append(3);
|
|
// list.Append(4);
|
|
// list.Append(5);
|
|
// list.Append(6);
|
|
// list.Insert(6, 1);
|
|
|
|
// Console.Write($"{list[0]} ");
|
|
// Console.Write($"{list[1]} ");
|
|
// Console.Write($"{list[2]} ");
|
|
// Console.Write($"{list[3]} ");
|
|
// Console.Write($"{list[4]} ");
|
|
// Console.Write($"{list[5]} ");
|
|
// Console.Write($"{list[6]} \n");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Stack<int> stack = Stack<int>.Create();
|
|
|
|
//stack.Push(1);
|
|
//stack.Push(2);
|
|
//stack.Push(3);
|
|
//stack.Push(4);
|
|
//stack.Push(5);
|
|
//stack.Push(6);
|
|
|
|
//Console.WriteLine(stack.Peek());
|
|
|
|
//stack.Pop();
|
|
//stack.Push(7);
|
|
|
|
//stack.Pop();
|
|
//stack.Pop();
|
|
//stack.Pop();
|
|
//stack.Pop();
|
|
//stack.Pop();
|
|
//stack.Pop();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Queue<int> queue = Queue<int>.Create();
|
|
|
|
//queue.Push(1);
|
|
//queue.Push(2);
|
|
//queue.Push(3);
|
|
//queue.Push(4);
|
|
//queue.Push(5);
|
|
//queue.Push(6);
|
|
|
|
//Console.WriteLine(queue.Peek());
|
|
|
|
//queue.Pop();
|
|
//queue.Push(7);
|
|
|
|
//queue.Pop();
|
|
//queue.Pop();
|
|
//queue.Pop();
|
|
//queue.Pop();
|
|
//queue.Pop();
|
|
//queue.Pop();
|
|
|
|
|
|
Console.ReadLine();
|
|
|
|
|
|
|