Search
Lessons (5)
- Graphs: BFS & DFS
… in an unweighted graph, it finds the shortest path (fewest edges). js function shortestPath(graph, start, goal) { const …
- DSA Interview Patterns Cheat Sheet
… shortest path", "minimum steps", "level by level" BFS O(V + E) "number of islands", "connected", "all paths" DFS …
- Trees & Binary Search Trees
… Level by level 1, 2, 3, 4, 5 Shortest path, printing by level The three depth-first traversals …
- Dynamic Programming
… over prefixes of both strings Grid paths Unique paths, minimum path sum dp[row][col] Intervals Burst balloons …
- Heaps & Priority Queues
… first (OS schedulers, BullMQ delayed jobs). - Dijkstra's shortest path: always expand the closest unvisited node (Google Maps …