Trees and Graphs - trees, forests, binary trees, threaded binary trees, binary search trees, AVL trees, B-tree variants, graphs - Question Bank
1. In the context of graph theory, what does 'connectedness' refer to?
2. Which of the following is NOT a type of tree discussed in the context of data structures?
3. What is the time complexity of BFS and DFS on a graph represented by an adjacency matrix, where V is the number of vertices?
4. What is the time complexity of BFS and DFS on a graph represented by an adjacency list, where V is the number of vertices and E is the number of edges?
5. Topological sorting is only possible on which type of graph?
6. What is the primary purpose of a 'topological sort'?
7. Dijkstra's algorithm is used to find the shortest path from a single source vertex to all other vertices in a graph. What condition must the graph satisfy?
8. What is a 'weighted graph'?
9. What is the primary application of DFS?
10. What is the primary application of BFS?
11. Which graph traversal algorithm typically uses a stack (either explicitly or implicitly via recursion)?
12. Which graph traversal algorithm uses a queue data structure?
13. What is a 'spanning tree' of a connected, undirected graph?
14. A graph with no cycles is called a:
15. What is a 'cycle' in a graph?
16. In a directed graph, what is the 'in-degree' of a vertex?
17. What is the 'degree' of a vertex in an undirected graph?
18. What distinguishes a directed graph from an undirected graph?
19. In an undirected graph, if there is an edge from vertex A to vertex B, is there also an edge from B to A?
20. What is a 'vertex' in a graph?
21. What does an 'edge' represent in a graph?
22. What is a graph in data structures?
23. What is a key advantage of B+ trees over B-trees for range queries?
24. In a B+ tree, where are all the data records typically stored?
25. What is the primary goal of B-tree variants like B+ trees?
26. In a B-tree of order 'm', what is the maximum number of children a node can have?
27. In a B-tree of order 'm', what is the minimum number of keys a non-root node can have?
28. What is the main characteristic of a B-tree node regarding the number of keys and children?
29. B-trees are particularly optimized for which type of storage?
30. What is a B-tree?
31. What are the primary operations used to restore balance in an AVL tree after an insertion or deletion?
32. When does an imbalance occur in an AVL tree?
33. What is the allowed range for the balance factor of any node in an AVL tree?
34. What is the 'balance factor' in an AVL tree?
35. What is an AVL tree?
36. What is the worst-case time complexity for search, insertion, and deletion in a standard Binary Search Tree?
37. What is the primary advantage of using a Binary Search Tree over a simple list for searching?
38. Which operation is typically most efficient in a Binary Search Tree?
39. What property must a Binary Search Tree (BST) satisfy?
40. In a threaded binary tree, what does a 'right thread' from a node point to?
41. What is a 'threaded binary tree' designed to improve?
42. What is the maximum number of nodes in a binary tree of height 'h' (where height of root is 0)?
43. What is a 'forest' in the context of trees?
44. Which traversal method visits nodes in the order: Left, Right, Root?
45. An in-order traversal of a binary tree visits nodes in what order?
46. Which traversal method visits nodes in the order: Root, Left, Right?
47. In a binary tree, what is the term for a node with no children?
48. What is the defining characteristic of a binary tree?
49. Which data structure is a collection of disjoint sets?
50. In a general tree, what is the maximum number of children a node can have?