Leetcode 802. Find Eventual Safe States
Given a directed graph, return all "eventual safe" nodes — nodes from which every possible path ends at a terminal node — which is equivalent to finding nodes not part of any cycle. This is typically solved by cycle detection (DFS coloring) or by reverse-graph topological pruning (Kahn's algorithm).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.