Skip to content

Commit

Permalink
Update and rename BreathFirstSearch.java to BreadthFirstSearch.java
Browse files Browse the repository at this point in the history
Replaced 'Breath' to 'Breadth'
  • Loading branch information
Ashirz authored Dec 12, 2024
1 parent f0ac226 commit 54b8ac0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class BreathFirstSearch {
private List<List<Integer>> adjList;

//BFS class constructor to the adjacency list
public BreathFirstSearch(int numVertices){
public BreadthFirstSearch(int numVertices){
adjList = new ArrayList<>();
for (int i = 0; i < numVertices; i++){
adjList.add(new ArrayList<>());
Expand Down Expand Up @@ -78,7 +78,7 @@ private void bfsRecursiveUtil(Queue<Integer> queue, boolean[] visited){

//Main method to demonstrate BFS
public static void main(String[] args) {
BreathFirstSearch graph = new BreathFirstSearch(6);
BreadthFirstSearch graph = new BreadthFirstSearch(6);

//Adding edges to the graph
graph.addEdge(0, 1);
Expand Down

0 comments on commit 54b8ac0

Please sign in to comment.