Update index.md (#30892)

Add text "### Application 

1. To find all connected components in a given graph
2. To find the shortest path between two nodes of any weighted or unweighted graph
3. To find all nodes within an individual connected components" to article.
This commit is contained in:
Gaurav Bisht
2019-06-23 18:25:09 +05:30
committed by Tom
parent bd829bb63a
commit 3d74d46cfb

View File

@@ -18,6 +18,12 @@ Worse Case Time Complexity: O(n)
Breadth First Search is complete on a finite set of nodes and optimal if the cost of moving from one node to another is constant.
### Application
1. To find all connected components in a given graph
2. To find the shortest path between two nodes of any weighted or unweighted graph
3. To find all nodes within an individual connected components
### C++ code for BFS implementation
```cpp