Data Structure Questions and Answers-Breadth First Search

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

Data Structure Questions and Answers-Breadth First Search

Click on any option to know the CORRECT ANSWERS

Question 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
Economics Questions answers

Question 1 Explanation: 
The Breadth First Search Algorithm searches the nodes on the basis of level. It takes a node (level 0), explores it's neighbors (level 1) and so on.

Question 2
Time Complexity of Breadth First Search is? (V - number of vertices, E - number of edges)
A
O(V + E)
B
O(V)
C
O(E)
D
None of the mentioned
Economics Questions answers

Question 2 Explanation: 
The Breadth First Search explores every node once and every edge once (in worst case), so it's time complexity is O(V + E).

Question 3
The Data structure used in standard implementation of Breadth First Search is?
A
Stack
B
Queue
C
Linked List
D
None of the mentioned
GK Questions answers

Question 3 Explanation: 
The Breadth First Search explores every node once and put that node in queue and then it takes out nodes from the queue and explores it's neighbors.

Question 4
The Breadth First Search traversal of a graph will result into?
A
Linked List
B
Tree
C
Graph with back edges
D
All of the mentioned
Home science Questions answers

Question 4 Explanation: 
The Breadth First Search will make a graph which don't have back edges (a tree) which is known as Breadth First Tree.

Question 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
None of the mentioned
Puzzles Questions answers

Question 5 Explanation: 
This is the definition of the Breadth First Search. Exploring a node, then it's neighbors and so on.

There are 5 questions to complete.

 

 Download all FREE PDF Ebook >>>CLICK HERE<<<