shortest path
shortest path is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.
Interview Signal
Frequently tests problem modeling, edge handling, and verbal clarity.
Common Pitfall
Template-only answers break under follow-up questioning.
Practice Strategy
Practice in 3-5 problem rounds and always review complexity alternatives.
Recommended Progression
Foundation
Evaluate Division
Compute the results of division queries from given equations using graph traversal and depth-first search efficiently.
Network Delay Time
Find the minimum time for a signal to travel to all nodes in a directed graph or determine if it's impossible.
Cheapest Flights Within K Stops
Find the cheapest flight from a source to a destination with at most K stops using graph traversal techniques efficientl…
Reachable Nodes In Subdivided Graph
The Reachable Nodes In Subdivided Graph problem requires efficiently finding the reachable nodes using graph traversal a…
Find the City With the Smallest Number of Neighbors at a Threshold Distance
Find the city with the fewest neighbors within a given threshold distance using dynamic programming.
Minimum Cost to Make at Least One Valid Path in a Grid
Determine the minimum cost to create at least one valid path from the top-left to bottom-right in a directional grid.
Path with Maximum Probability
Find the path with the highest success probability in a graph from a start node to an end node, using edge probabilities…
Number of Restricted Paths From First to Last Node
Solve the problem of finding the number of restricted paths in a weighted undirected graph, leveraging graph algorithms …
Number of Ways to Arrive at Destination
Find the number of ways to travel from intersection 0 to n - 1 in the shortest time, using a graph-based approach.
Second Minimum Time to Reach Destination
Find the second minimum time to reach a destination using BFS while accounting for traffic signal delays in a graph trav…
Minimum Weighted Subgraph With the Required Paths
Find the minimum weighted subgraph that connects three specified nodes in a directed graph with constraints.
Minimum Obstacle Removal to Reach Corner
Find the minimum obstacles to remove in a 2D grid to reach the bottom-right corner using BFS graph traversal techniques.
Minimum Time to Visit a Cell In a Grid
Compute the fastest path in a grid where each cell has a minimum time requirement using BFS and priority queue technique…
Design Graph With Shortest Path Calculator
Implement a dynamic weighted directed graph with efficient shortest path queries and edge additions in real time.
Minimum Cost of a Path With Special Roads
Find the minimum cost path between two points, using special roads or direct moves in a 2D space.
Modify Graph Edge Weights
Modify Graph Edge Weights is a graph problem where you adjust edge weights to match a target shortest path distance.
Number of Possible Sets of Closing Branches
Calculate all valid sets of branch closures while keeping remaining branches within maxDistance using bitmask and graph …
Minimum Cost to Convert String I
This problem asks to calculate the minimum cost to convert a string from source to target using specific character trans…
Minimum Cost to Convert String II
Compute the minimum cost to transform source into target using substring replacements with given costs efficiently using…
Minimum Time to Visit Disappearing Nodes
Determine the minimum time to visit each node in a disappearing-node graph using arrays, graphs, and priority queues eff…
Find Edges in Shortest Paths
Use two Dijkstra runs to mark exactly which edges can appear on at least one shortest path from 0 to n - 1.
Find a Safe Walk Through a Grid
Determine if you can safely traverse a binary grid from top-left to bottom-right using limited health points.
Find Minimum Time to Reach Last Room I
Find Minimum Time to Reach Last Room I challenges you to determine the minimum time to travel in a dungeon with a grid l…
Find Minimum Time to Reach Last Room II
Calculate the minimum time to reach the last room in a grid with alternating move times using array and graph patterns.
Digit Operations to Make Two Integers Equal
Transform n into m using allowed digit operations without creating primes, applying math and graph strategies efficientl…
Minimize the Maximum Edge Weight of Graph
Minimize the maximum edge weight in a graph after removing certain edges while ensuring node reachability.
Minimum Time to Transport All Individuals
Find the minimum time to transport individuals across a river with dynamic environmental conditions and boat capacity.
Minimum Time to Reach Destination in Directed Graph
The problem involves finding the minimum time to reach the destination in a directed graph with time-dependent edges.
Network Recovery Pathways
Find the maximum recovery cost of valid paths in a directed acyclic graph where some nodes are offline.
Related Patterns
Graph plus Heap (Priority Queue)
11 linked problems
Graph traversal with depth-first search
5 linked problems
Graph traversal with breadth-first search
5 linked problems
State transition dynamic programming
3 linked problems
Graph indegree plus topological ordering
2 linked problems
Graph plus Shortest Path
1 linked problems