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

## Data Structure Questions and Answers-Depth First Search

## Click on any option to know the CORRECT ANSWERS

Question 1 |

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 |

**HRM Questions answers**

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 |

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

O(V + E) | |

O(V) | |

O(E) | |

None of the mentioned |

**English grammar Questions answers**

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 |

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

Stack | |

Queue | |

Linked List | |

None of the mentioned |

**English literature Questions answers**

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 |

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

Linked List | |

Tree | |

Graph with back edges | |

None of the mentioned |

**Bank exam Questions answers**

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 |

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 |

**EVS Questions answers**

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.

There are 5 questions to complete.