Discrete Sturcture MCQ
Discrete Sturcture MCQ
a) Pre-order Traversal
b) Post-order Traversal
c) Level-order Traversal
d) In-order Traversal
Answer: a
2. Time Complexity of DFS is? (V – number of vertices, E – number of edges)
a) O(V + E)
b) O(V)
c) O(E)
d) O(V*E)
Answer: a
3. The Data structure used in standard implementation of Breadth First Search is?
a) Stack
b) Queue
c) Linked List
d) Tree
Answer: a
Answer: b
Clarification: The Depth First Search will make a graph which don’t have back edges
(a tree) which is known as Depth First Tree.
5. A person wants to visit some places. He starts from a vertex and then wants to
visit every vertex till it finishes from one vertex, backtracks and then explore other
vertex from same vertex. What algorithm he should use?
a) Depth First Search
b) Breadth First Search
c) Trim’s algorithm
d) Kruskal’s Algorithm
Answer: a
Answer: d
Answer: b
Answer: a
1. Breadth First Search is equivalent to which of the traversal in the Binary Trees?
a) Pre-order Traversal
b) Post-order Traversal
c) Level-order Traversal
d) In-order Traversal
Answer: c
Answer: a
3. The Data structure used in standard implementation of Breadth First Search is?
a) Stack
b) Queue
c) Linked List
d) Tree
Answer: b
Answer: b
5. A person wants to visit some places. He starts from a vertex and then wants to
visit every place connected to this vertex and so on. What algorithm he should use?
a) Depth First Search
b) Breadth First Search
c) Trim’s algorithm
d) Kruskal’s algorithm
Answer: b
Answer: d
Answer: b
Answer: c
Answer: c