Explore topic-wise MCQs in Data Structures and Algorithms.

This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.

1.

Most Efficient Time Complexity of Topological Sorting is? (V – number of vertices, E – number of edges)

A. O(V + E)
B. O(V)
C. O(E)
D. O(V*E)
Answer» B. O(V)
2.

When the topological sort of a graph is unique?

A. When there exists a hamiltonian path in the graph
B. In the presence of multiple nodes with indegree 0
C. In the presence of single node with indegree 0
D. None of the mentioned
Answer» B. In the presence of multiple nodes with indegree 0
3.

A man wants to go different places in the world. He has listed them down all. But there are some places where he wants to visit before some other places. What application of graph can he use to determine that?

A. Depth First Search
B. Breadth First Search
C. Topological Sorting
D. Dijkstra’s Shortest path algorithm
Answer» D. Dijkstra‚Äö√Ñ√∂‚àö√ë‚àö¬•s Shortest path algorithm
4.

Topological sort is equivalent to which of the traversals in trees?

A. Pre-order traversal
B. Post-order traversal
C. In-order traversal
D. Level-order traversal
Answer» B. Post-order traversal
5.

Topological sort can be implemented by?

A. Using Depth First Search
B. Using Breadth First Search
C. Using Depth and Breadth First Search
D. None of the mentioned
Answer» D. None of the mentioned
6.

Topological sort of a Directed Acyclic graph is?

A. Always unique
B. Always Not unique
C. Sometimes unique and sometimes not unique
D. None of the mentioned
Answer» D. None of the mentioned
7.

What can be the applications of topological sorting?

A. Finding prerequisite of a task
B. Finding Deadlock in an Operating System
C. Finding Cycle in a graph
D. All of the mentioned
Answer» E.
8.

Topological sort starts from a node which has?

A. Maximum Degree
B. Minimum Degree
C. Any degree
D. None of the mentioned
Answer» C. Any degree
9.

Most Efficient Time Complexity of Topological Sorting is? (V – number of vertices, E – number of edges)$

A. O(V + E)
B. O(V)
C. O(E)
D. None of the mentioned
Answer» B. O(V)
10.

Topological sort can be applied to which of the following graphs?

A. Undirected Cyclic Graphs
B. Directed Cyclic Graphs
C. Undirected Acyclic Graphs
D. Directed Acyclic Graphs
Answer» E.