This question was previously asked in

HTET PGT Official Computer Science Paper - 2019

- ABCD
- BACD
- BADC
- ABDC

Option 4 : ABDC

Free

HTET PRT 2019_Child Development and Pedagogy

2119

30 Questions
30 Marks
30 Mins

- The topological sorting for a directed acyclic graph is the linear ordering of vertices. For every edge U-V of a directed graph, the vertex u will come before vertex v in the ordering.
- The first vertex in topological sorting is always a vertex with in-degree as 0 (a vertex with no incoming edges.

**Diagram**

Therefore, the topological ordering of the given graph is ABDC

Topological sort can be performed in the time since depth-first search takes O(V + E)‚ time and it takes O(1) time to insert each of the |V| vertices onto the front of the linked list

India’s **#1 Learning** Platform

Start Complete Exam Preparation

Daily Live MasterClasses

Practice Question Bank

Mock Tests & Quizzes

Trusted by 2,31,06,250+ Students

60 Total Tests 4 Free Tests

Start Free Test
75 Total Tests 2 Free Tests

Start Free Test
Testbook Edu Solutions Pvt. Ltd.

1st & 2nd Floor, Zion Building,

Plot No. 273, Sector 10, Kharghar,

Navi Mumbai - 410210

[email protected]
Plot No. 273, Sector 10, Kharghar,

Navi Mumbai - 410210

Toll Free:1800 833 0800

Office Hours: 10 AM to 7 PM (all 7 days)