Which of the following conditions is sufficient to detect a cycle in a directed graph?

a. There is an edge from the currently being visited vertex to an ancestor
b. Every node is seen twice in DFS
c. There is an edge from the currently being visited node to an already visited node
d. None of the above


a. There is an edge from the currently being visited vertex to an ancestor

Computer Science & Information Technology

You might also like to view...

When many LAN devices are connected to a single cable, it is called a

a. star network b. mesh network c. bus network d. ring network

Computer Science & Information Technology

In what year did the ANSI committee publish the final official standard of C++?

A. 1978 B. 1982 C. 1994 D. 1997

Computer Science & Information Technology

Which of the following is not a superclass/subclass relationship?

a. Employee/Hourly Employee. b. Vehicle/Car. c. Sailboat/Tugboat. d. None of the above.

Computer Science & Information Technology

Which of the following is NOT a feature or function available by using Backstage in Office 2010?

A) View file properties B) Close a file C) Save a file D) Move a file

Computer Science & Information Technology