This video is part of Graphs section under GFG SDE Sheet.
In this video, we are given, a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, Our task is to check whether it contains any cycle or not.
Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!
Do check out:-
Article: https://www.geeksforgeeks.org/detect-cycle-in-a-graph/
Problem: https://practice.geeksforgeeks.org/problems/detect-cycle-in-a-directed-graph/1
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/