Breadth-first-search

Level: Beginner

1. Implement the basic Breadth First Search (BFS) for a graph.
2. Write a function to perform BFS on a binary tree.
3. Implement a function to find the level order traversal of a binary tree using BFS.
4. Write a function to find the shortest path in an unweighted graph using BFS.
5. Implement a function to find the number of connected components in an undirected graph using BFS.
6. Write a function to check if a graph is bipartite using BFS.
7. Implement a function to find the shortest path from a source to all vertices in an unweighted graph using BFS.
8. Write a function to find the distance between two nodes in an unweighted graph using BFS.
9. Implement a function to find the sum of nodes at the kth level of a binary tree using BFS.
10. Write a function to find the width of a binary tree using BFS.
11. Implement a function to find the maximum value at each level of a binary tree using BFS.
12. Write a function to find the minimum value at each level of a binary tree using BFS.
13. Implement a function to find the right view of a binary tree using BFS.
14. Write a function to find the left view of a binary tree using BFS.
15. Implement a function to find the bottom view of a binary tree using BFS.
16. Write a function to find the top view of a binary tree using BFS.
17. Implement a function to check if there is a path between two nodes in an undirected graph using BFS.
18. Write a function to find the number of islands in a 2D grid using BFS.
19. Implement a function to solve the "Flood Fill" problem using BFS.
20. Write a function to perform BFS on a graph represented as an adjacency matrix.
21. Implement a function to perform BFS on a graph represented as an adjacency list.
22. Write a function to find the minimum depth of a binary tree using BFS.
23. Implement a function to find all nodes at a distance k from a given node in a binary tree using BFS.
24. Write a function to find the shortest path in a binary maze using BFS.
25. Implement a function to find the longest path in an unweighted graph using BFS.
26. Write a function to find the shortest path in a grid with obstacles using BFS.
27. Implement a function to find all possible paths from the root to leaf nodes in a binary tree using BFS.
28. Write a function to determine if a binary tree is a complete binary tree using BFS.
29. Implement a function to find the maximum depth of a binary tree using BFS.
30. Write a function to find the deepest leaves sum in a binary tree using BFS.

Intermediate Level: View

Advanced Level: View