Describe BFS and DFS
Write down the difference between BFS and DFS?
Expert
BFS: This can be thought of as being such as Dijkstra's algorithm for shortest paths, however with each and every edge containing the same length. Though it is a lot simpler and does not require any data structures. We just keep a tree (that is, the breadth first search tree), a list of nodes to be added to tree and markings (Boolean variables) on the vertices to tell whether they are in the tree or list.
Depth first search is the other way of traversing graphs, which is closely associated to preorder traversal of a tree. Remember that preorder traversal just visits each node before its children. It is most simple to program as a recursive routine.
Which one data structures used to perform recursion?
Define the term a spanning Tree.
Describe the term two-dimensional array by using example?
Whether Linked List is linear or Non-linear data structure?
When should we use Space in linked list instead of an array or vice versa?
What are the dvantages of single linked list over doubly linked list?
Explain how deletion is performed in the binary search tree.
What do you mean by sequential search? Find out the average number of comparisons in the sequential search?
Illustrates term binary searching?
What do you mean by the term matrix? Describe its uses with an illustration.
18,76,764
1960083 Asked
3,689
Active Tutors
1460220
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!