🔍 BFS vs DFS
Compare Breadth-First and Depth-First Search
🌊 BFS - Breadth-First
Uses a Queue (FIFO). Explores level by level. Finds shortest path in unweighted graphs.
🌲 DFS - Depth-First
Uses a Stack (LIFO). Goes deep before backtracking. Good for topological sort, cycle detection.
Click a node to start the search from that node, or click "Next Step".