1. Arrays and linked lists are examples of linear data structures. On the other hand, graphs and trees are forms of non-linear data structures.
2. A graph is a system in which there are potentially ____________ to get from an arbitrary point, A, to another arbitrary point, B
3. A graph is normally defined as a pair of sets (V,E). V is a set of arbitrary objects called _______________ and E is a set of pairs of vertices, which we call edges or (more rarely) arcs
4. Two algorithms are generally used for the traversal of a graph: Depth first search (DFS) and _______________________
5. Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a ______
6. Fill in the blanks for this exerpt on solving maze-type problems
7. Which of the following definitions is for a Breadth first search algorithm and a Depth first search algorithm?
8. Analyse the following code (Python). What is likely to go in the line where the ?????????s are?
9. Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new (unvisited) vertex visited after visiting u in the traversal. Which of the following
10. A Depth First Traversal of the following graph is:
2, 0, 1, 3.
11. This is an algorithm for traversing a finite graph. It visits the child vertices before visiting the sibling vertices
12. Analyse the following image and select the option which describes what happens next.
13. In the following implementation of a DFS, what happens next? Select the option that best describes it
14. In the implementation of a depth first search, a ______ (often the program's call _____via recursion) is generally used
15. BFS (Breadth first search) visits the neighbor vertices before visiting the child vertices, and a_______ is used in the search process
16. The BFS algorithm is often used to find the _____________________________________
17. In this Breadth first search, what happens next?
18. Looking at the following graph, and assuming a BFS algorithm implementation with a queue, what is the only possible (from the given options) order of visiting the nodes?
19. Given two vertices in a graph s and t, which of the two traversals (BFS and DFS) can be used to find if there is path from s to t?
20. Which of the following statements is most true about this Java code snippet.