Graphs

Detect a Cycle in a Graph: Directed and Undirected

4 min read Cycle detection is asked in interviews at Google, Meta, Amazon, and anywhere that tests graphs. The classic application is deadlock […] Read article