fix: clang-format for graph/ (#1056)

* fix: clang-format for graph/

* remove graph.h
This commit is contained in:
Filip Hlasek
2020-08-27 07:28:31 -07:00
committed by GitHub
parent 3239fcc19e
commit 79fb528dad
11 changed files with 67 additions and 60 deletions

View File

@@ -89,11 +89,12 @@ void add_undirected_edge(std::vector<std::vector<int>> *graph, int u, int v) {
*
* @param graph Adjacency list representation of graph
* @param start vertex from where traversing starts
* @returns a binary vector indicating which vertices were visited during the search.
* @returns a binary vector indicating which vertices were visited during the
* search.
*
*/
std::vector<bool> breadth_first_search(const std::vector<std::vector<int>> &graph,
int start) {
std::vector<bool> breadth_first_search(
const std::vector<std::vector<int>> &graph, int start) {
/// vector to keep track of visited vertices
std::vector<bool> visited(graph.size(), false);
/// a queue that stores vertices that need to be further explored