retagged by
307 views

1 Answer

1 votes
1 votes
Option B should be the correct answer.

In topological sorting we should start with nodes whose in-degrees are 0. two such nodes are there h and c.

Now options starting with h are not valid. namely for first option e cannot be reached after a, since as per the matrix d should come before e.

for the last option after h, c should come since it's in-degree is zero and can be reached at this stage. e cannot be reached before reaching d and c.

coming to options with c

In the second option all the elements in the order from left to right are reached after the element (which has a directed edge towards it) has been reached.

Hence option A is correct.

Related questions

3 votes
3 votes
1 answer
1