-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
50 lines (37 loc) · 1.29 KB
/
Copy pathProgram.cs
File metadata and controls
50 lines (37 loc) · 1.29 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
namespace Task22
{
internal class Program
{
static void Main(string[] args)
{
LinkedList<string> names = new LinkedList<string>();
names.AddToTail("steve");
names.AddToTail("fred");
names.AddToTail("mark");
Console.WriteLine(names.Count);
Console.WriteLine(names.Check("steve"));
Console.WriteLine(names.Index("mark"));
Console.WriteLine(names.Remove("fred"));
Stack<string> places = new Stack<string>();
Console.WriteLine(places.IsEmpty());
places.Push("kaduna");
places.Push("jos");
places.Push("lagos");
Console.WriteLine(places.IsEmpty());
Console.WriteLine();
Console.WriteLine(places.Size());
Console.WriteLine();
places.Peek();
Console.WriteLine();
places.Pop();
MyQueue<string> countries = new MyQueue<string>();
Console.WriteLine(countries.IsEmpty());
countries.Enqueue("Nigeria");
countries.Enqueue("Belarus");
countries.Enqueue("Egypt");
Console.WriteLine(countries.IsEmpty());
countries.Dequeue();
}
}
}