TRAINING CATEGORIES
TRAINING PROGRAMS
Problem Statement:
Given the root of a Undirected graph, The task is to check whether the graph contains a cycleor not.
Input:
N = 4, E = 4 The diagram clearly shows a cycle 0 to 2 to 1 to 0
Output:
Yes
We use cookies to make interactions with our websites and services easy and meaningful. Please read our Privacy Policy for more details.