Data Structures Algorithms-II MCQs

Page No. 60

The Depth First Search traversal of a graph will result into?


aLinked List


b Tree


cGraph with back edges


dArray


View Answer Tree

Time Complexity of DFS is? (V – number of vertices, E – number of edges)


aO(V + E)


bO(V)


cO(E)


dO(V*E)


View Answer O(V + E)

Depth First Search is equivalent to which of the traversal in the Binary Trees?


aPre-order Traversal


bPost-order Traversal


cLevel-order Traversal


din-order Traversal


View Answer Pre-order Traversal

Choose the incorrect statement about DFS and BFS from the following?


aBFS is equivalent to level order traversal in trees


bDFS is equivalent to post order traversal in trees


cDFS and BFS code has the same time complexity


dBFS is implemented using queue



Which of the following data structure is used to implement BFS?


alinked list


btree


cstack


dqueue


View Answer queue

What is the space complexity of standard DFS(V: no. of vertices E: no. of edges)?


aO(V+E)


bO(V)


cO(E)


dO(V*E)


View Answer O(V)

What will be the time complexity of the iterative depth first traversal code(V=no. of vertices E=no.of edges)?


aO(V+E)


bO(V)


cO(E)


d O(V*E)


View Answer O(V+E)

Which of the following is a possible result of depth first traversal of the given graph(consider 1 to be source element)?


a1 2 3 4 5


b1 2 3 1 4 5


c1 4 5 3 2


d1 4 5 1 2 3


View Answer 1 2 3 4 5

What will be the result of depth first traversal in the following tree?


a 4 2 5 1 3


b1 2 4 5 3


c4 5 2 3 1


d1 2 3 4 5


View Answer 1 2 4 5 3

Which of the following traversal in a binary tree is similar to depth first traversal?


a level order


bpost order


cpre order


d in order


View Answer pre order

Goto Page No.

Page 60 of 149

Alphabetical MCQs Categories

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan