CruiseSoftware Engineer · OnsiteCodemia practiceTwo Pointers on graph
Given a directed graph represented as an adjacency list, implement the two pointers technique to find the shortest path between two nodes. Your solution should return the path as a list of nodes, or indicate if no path exists. The input will consist of the graph and the start and end nodes, while the output should be the shortest path or an empty list if unreachable.
Medium
Coding & Algorithms