**DOWNLOAD FREE PDF** **<<CLICK HERE>>**

## Data Structure Questions and Answers-Depth First Search

Congratulations - you have completed *Data Structure Questions and Answers-Depth First Search*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

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

Pre-order Traversal | |

Post-order Traversal | |

Level-order Traversal | |

In-order Traversal |

Question 1 Explanation:

In Depth First Search, we explore all the nodes aggressively to one path and then backtrack to the node. Hence, it is equivalent to the pre-order traversal of a Binary Tree.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

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

O(V + E) | |

O(V) | |

O(E) | |

None of the mentioned |

Question 2 Explanation:

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

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

The Data structure used in standard implementation of Breadth First Search is?

Stack | |

Queue | |

Linked List | |

None of the mentioned |

Question 3 Explanation:

The Depth First Search is implemented using recursion. So, stack can be used as data structure to implement depth first search.

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

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

Linked List | |

Tree | |

Graph with back edges | |

None of the mentioned |

Question 4 Explanation:

The Depth First Search will make a graph which don't have back edges (a tree) which is known as Depth First Tree.

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

A person wants to visit some places. He starts from a vertex and then wants to visit every vertex till it finishes from one verte, x backtracks and then explore other vertex from same vertex. What algorithm he should use?

Depth First Search | |

Breadth First Search | |

Trim's algorithm | |

None of the mentioned |

Question 5 Explanation:

This is the definition of the Depth First Search. Exploring a node, then aggressively finding nodes till it is not able to find any node.

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.

There are 5 questions to complete.