-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (31 loc) · 1.29 KB
/
Program.cs
File metadata and controls
33 lines (31 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lesson2
{
class Program
{
static void Main(string[] args)
{
Bsearch.BiSearch(); // запуск бинарного поиска - оформил отдельным классом
Console.WriteLine();
var linkedList = new LinkedList();
var startNode = new Node() { Value = 99 };// создание
linkedList.AddNode( 55);// должно создавать и добавлять, но ничего не происходит
linkedList.AddNodeAfter(startNode, 11);// добавляет
linkedList.AddNodeAfter(startNode, 12); // добавляет
linkedList.AddNodeAfter(startNode, 26); // дбавляет
linkedList.AddNodeAfter(startNode, 27); // дбавляет
linkedList.AddNode(76);
linkedList.Print();
linkedList.RemoveNode(2);
// linkedList.PrintList(startNode); ;// выводит на экран список
// linkedList.RemoveNode(startNode); // убирает
Console.WriteLine();
linkedList.Print();
Console.ReadLine();
}
}
}