mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 11:40:46 +08:00
fix: clang-format for graph/ (#1056)
* fix: clang-format for graph/ * remove graph.h
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user