Graph Search on Data Structure and Algorithms related Questions and Answers - Page 6

Question 51 : Regarding implementation of Depth First Search using stacks, what is the maximum distance between two nodes present in the stack? (considering each edge length 1)
1. Can be anything
2. 0
3. At most 1
4. Insufficient Information
View Answer   Discuss with Members

Question 52 : Time Complexity of DFS is? (V - number of vertices, E - number of edges)
1. O(V + E)
2. O(V)
3. O(E)
4. None of the mentioned
View Answer   Discuss with Members

Question 53 : Which of the following data structure is used to implement DFS?
1. linked list
2. tree
3. stack
4. queue
View Answer   Discuss with Members

Question 54 : 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?
1. Depth First Search
2. Breadth First Search
3. Trim's algorithm
4. None of the mentioned
View Answer   Discuss with Members

Question 55 : Depth First Search is equivalent to which of the traversal in the Binary Trees?
1. Pre-order Traversal
2. Post-order Traversal
3. Level-order Traversal
4. In-order Traversal
View Answer   Discuss with Members

Question 56 : The Depth First Search traversal of a graph will result into?
1. Linked List
2. Tree
3. Graph with back edges
4. None of the mentioned
View Answer   Discuss with Members

Question 57 : The Data structure used in standard implementation of Breadth First Search is?
1. Stack
2. Queue
3. Linked List
4. None of the mentioned
View Answer   Discuss with Members

Question 58 : What will be the time complexity of the iterative depth first traversal code(V=no. of vertices E=no.of edges)?
1. O(V+E)
2. O(V)
3. O(E)
4. O(V*E)
View Answer   Discuss with Members

Question 60 : What is the space complexity of standard DFS(V: no. of vertices E: no. of edges)?
1. O(V+E)
2. O(V)
3. O(E)
4. O(V*E)
View Answer   Discuss with Members


View 51 - 60 of 61 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter