-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
52 lines (43 loc) · 1.47 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
namespace GraphResolver
{
class Program
{
// fill edges data for testing...
private static List<Tuple<int, int>> _edges = new List<Tuple<int, int>>() {
new Tuple<int, int>(1, 2),
new Tuple<int, int>(1, 3),
new Tuple<int, int>(2, 4),
new Tuple<int, int>(3, 4),
new Tuple<int, int>(4, 5),
new Tuple<int, int>(4, 6),
//------------------------
new Tuple<int, int>(5, 15),
new Tuple<int, int>(5, 7),
new Tuple<int, int>(6, 7),
new Tuple<int, int>(7, 8),
new Tuple<int, int>(7, 9),
new Tuple<int, int>(8, 10),
new Tuple<int, int>(9, 10),
new Tuple<int, int>(10, 11),
new Tuple<int, int>(10, 12),
new Tuple<int, int>(12, 120),
new Tuple<int, int>(120, 88),
new Tuple<int, int>(88, 33),
new Tuple<int, int>(88, 55),
};
static void Main(string[] args)
{
Console.WriteLine("GraphResolver started.");
var result = GraphResolver.ConnectingPaths(_edges, 1, 4);
foreach (var route in result)
{
Console.Write(string.Join(",", route.ToArray()));
Console.WriteLine();
}
Console.WriteLine("GraphResolver finished.");
Console.ReadLine();
}
}
}