Amazon Interview Question

Detect a cycle in a graph

Interview Answer

Anonymous

Jan 4, 2019

DFS using a stack, if current node is contained in stack there is a cycle