Location: Visualize > BFS
- Select Start Node - Choose where BFS begins (e.g., Node 0)
- Select Target Node - Choose destination to find shortest path
- Click "Start" - Watch BFS explore level by level
- View Path - Shortest path displayed at top after completion
- ✅ Queue shows FIFO (First In, First Out) order
- ✅ Nodes visited level by level
- ✅ Shortest path guaranteed
- ✅ Distance shows levels from start node
- Change Start Node → Algorithm automatically resets and regenerates steps ✅
- Change Target Node → Path updates instantly (no need to re-run) ✅
Location: Visualize > DFS
- Select Start Node - Choose where DFS begins
- Select Target Node (optional) - See path to specific node
- Click "Start" - Watch DFS explore depth-first
- View Path - DFS path displayed after completion
- ✅ Stack shows LIFO (Last In, First Out) order
- ✅ Goes as deep as possible before backtracking
- ✅ Depth tracking shows how deep each node is
- ✅ Backtracking visualization
- Change Start Node → Algorithm automatically resets and regenerates steps ✅
- Change Target Node → Path updates instantly ✅
Location: DAA > Dijkstra
- Select Source Node - Choose starting point
- Click "Start" - Watch Dijkstra find shortest paths
- View Results - All shortest distances shown in right panel
- ✅ Priority queue picks minimum distance node
- ✅ Edge relaxation updates distances
- ✅ Shortest paths to ALL nodes calculated
- ✅ Works with weighted edges
- Change Source Node → Algorithm automatically resets and regenerates steps ✅
- Works with ANY node (0, 1, 2, etc.) ✅
Solutions:
- Hard refresh browser: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
- Clear cache and reload
- Click "Apply" button if available
- Restart Angular dev server:
# Stop current server (Ctrl+C) # Then restart: ng serve
Cause: Nodes are disconnected (no path exists)
Solutions:
- Click "Randomize" to generate a new connected graph
- Try different start/target nodes that are connected
- Check if graph visualization shows edges between nodes
Solutions:
- Wait a moment - Large graphs take time to generate steps
- Click "Reset" button manually
- Refresh the page and try again
Cause: Might be using cached old steps
Solutions:
- Click "Reset" before changing nodes
- Hard refresh browser (Ctrl+Shift+R)
- Change start node (this triggers automatic reset)
Start Node: 0, Target Node: 5
✅ Should show: 0 → 1 → 5 (shortest path)
✅ Distance: 2 (2 hops)
✅ All nodes at level 1, then level 2, then level 3...
Start Node: 0, Target Node: 5
✅ Should show: 0 → 2 → 4 → 5 (one possible DFS path)
✅ Depth values shown for each node
✅ Explores one branch completely before backtracking
Source Node: 0
✅ Shows distances to ALL nodes
✅ Example: {0: 0, 1: 4, 2: 12, 3: 19, ...}
✅ Previous node (prev) shown for path reconstruction
✅ Works even if some nodes unreachable (shows ∞)
- Start/Play
▶️ - Begin visualization - Pause ⏸️ - Pause at current step
- Reset 🔄 - Go back to beginning
- Next Step ⏭️ - Manual step-through
- Randomize 🎲 - Generate new graph
- Start Node / Source - Where algorithm begins
- Target Node (BFS/DFS) - Destination to find path to
- BFS finds SHORTEST PATH (minimum hops)
- DFS finds A PATH (not necessarily shortest)
- Use BFS when you need the shortest unweighted path
- Use DFS for exploring all possibilities or specific patterns
- Finds SHORTEST WEIGHTED PATH to all nodes
- More powerful than BFS (handles edge weights)
- Uses greedy approach with relaxation
- Guaranteed optimal for non-negative weights
Status: ✅ ALL ALGORITHMS WORKING CORRECTLY
- ✅ BFS logic correct with shortest path guarantee
- ✅ DFS logic correct with depth-first exploration
- ✅ Dijkstra logic correct with weighted shortest paths
- ✅ Start node changes work automatically
- ✅ Target node changes update paths instantly
- ✅ No compilation errors
Enjoy exploring these classic graph algorithms! 🎉