HF RL Explorer

Task: Cycle Detection in an Undirected Graph

Task: Cycle Detection in an Undirected Graph: a task in Terminal-Lego-15k (Harbor dataset). Implement a program that detects whether an undirected graph contains a cycle. The algorithm must run in O(n) time complexity, where n is the number of vertices in the graph.

The task

Implement a program that detects whether an undirected graph contains a cycle. The algorithm must run in O(n) time complexity, where n is the number of vertices in the graph.

Part of PrimeIntellect/Terminal-Lego-15k.