Course Schedule II Leetcode

Getting 1 test case wrong
Code Link:-https://ide.geeksforgeeks.org/yENtU2mCkl

hello @Bhawna
pls wait, working on ur code

@Bhawna
the cycle detection part is partially correct.

u need to call dfs from all unvisited node ( u r calling only from a single node)

@Bhawna
refer this if u didnt get what i m saying .-> link