Cycle Detection in Directed Graph using DFS

this code is showing segmentation fault .pls point out mistakes

@Keshav99 you haven’t made any graph thats why i think . if your doubt is cleared dont forget to mark the doubt resolved and hit like