-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
35 lines (30 loc) · 948 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BattleQueue
{
public class Program
{
public static void Main()
{
BattleQueue queue = new BattleQueue();
Console.WriteLine("Inserting in sorted manner: ");
//
queue.InsertSort(new Node { Value = 1 });
queue.InsertSort(new Node { Value = 3 });
queue.InsertSort(new Node { Value = 2 });
queue.Print();
Console.WriteLine("Change value at index 0 (head) to 4: ");
//
queue.Change(0, 4);
queue.Print();
Console.WriteLine("Print in reverse (from tail): ");
queue.PrintReverse();
Console.WriteLine("Print elements continuously as desired by param: ");
queue.Print(5);
Console.ReadLine();
}
}
}