TRAINING CATEGORIES
TRAINING PROGRAMS
Problem Statement:
Given the root of a Directed graph, The task is to check whether the graph contains a cycle or not.
Input:
N = 4, E = 6 The diagram clearly shows a cycle 0 -> 2 -> 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.