1 votes 1 votes Choose the correct option, from the following: I) We can find the cycle in the graph using BFS. II) We can find the cycle in the graph using DFS. III)Both Correct IV)Both wrong Programming in C depth-first-search cycle + – ankit_thawal asked Jan 10, 2018 ankit_thawal 393 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Anu007 commented Jan 10, 2018 reply Follow Share Both can be used to find cycle in graph . 1 votes 1 votes ankit_thawal commented Jan 10, 2018 reply Follow Share I also gave the option (III) but answers is(II). Explanation provided is that BFS is bad choice when graph is directed. But as in question it's nowhere mentioned about type of grpah so i think option(III) is correct. Correct me if I am wrong. 0 votes 0 votes joshi_nitish commented Jan 10, 2018 reply Follow Share even in directed graph, both BFS and DFS can detect cycle. 0 votes 0 votes Shivam Chauhan commented Jan 10, 2018 reply Follow Share Back edges are used to detect cycles. We find back edges in BFS and DFS both. So both are correct. 0 votes 0 votes Please log in or register to add a comment.