Practice Problem: Check if there is a directed path from node a to node b. Input: n nodes, m edges, and a query (a,b). Output: "YES" if a can reach b, "NO" otherwise. Hint: Run SCC detection. If a and b are in the same SCC, answer is "YES" (mutual reachability).
If they are in different SCCs, check if there is a path from scc[a] to scc[b] in the condensation DAG using BFS or DFS. This is faster than running BFS from a every time if you have multiple queries.