Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE-CS-2014-(Set-1) | Question 22

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Consider the directed graph given below. Which one of the following is TRUE?

GATECS2014Q22
(A) The graph doesn’t have any topological ordering
(B) Both PQRS and SRPQ are topological ordering
(C) Both PSRQ and SPRQ are topological ordering
(D) PSRQ is the only topological ordering


Answer: (C)

Explanation: The graph doesn’t contain any cycle, so there exist topological ordering.

P and S must appear before R and Q because there are edges from P to R and Q, and from S to R and Q.

See Topological Ordering for more details.


Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads