Website Summary Files Commits Branches @commit @diff @stats
path: root / Seminar11 / Graph-Impl / AdjacencyListGraph / src.cpp
blob: b0484e0fc45de971caa84028c863ee5b753631e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<iostream>
#include<list>
#include<algorithm>
#include"AdjListGraph.h"

int main() {
    AdjListGraph g(10);

    g.addEdge(0, 1, 1);
    g.addEdge(0, 2, 1);
    g.addEdge(0, 3, 1);
    g.addEdge(0, 4, 1);

    auto res = g.adjacent(1);

    for(auto i : res) {
        std::cout << i.to << " ";
    }
}