DATA STRUCTURES
Unit V · Trees and Graphs
Clear answers, algorithms and worked examples for the current syllabus.
Questions and answers
- 01What is a tree?2 marks
- 02Explain tree terminology and common types of binary trees.5 marks
- 03What do the two links mean in left-child/right-sibling form?2 marks
- 04Explain conversion of a general rooted tree to left-child/right-sibling representation.5 marks
- 05State the visitation orders of the three depth-first tree traversals.2 marks
- 06Explain preorder, inorder and postorder binary-tree traversals.5 marks
- 07What is the binary search tree ordering rule used here?2 marks
- 08Define the BST ADT and explain searching.5 marks
- 09Where is a new distinct BST key placed?2 marks
- 10Explain BST insertion with an example.5 marks
- 11What are the three BST deletion cases?2 marks
- 12Explain all BST deletion cases with an algorithm.5 marks
- 13What is a graph?2 marks
- 14Define graphs and explain common graph types.5 marks
- 15What does an adjacency-matrix entry represent?2 marks
- 16Compare adjacency matrices and adjacency lists.5 marks
- 17What exploration rule does DFS follow?2 marks
- 18Explain depth-first search with an algorithm and example.5 marks
- 19When should a vertex be marked visited in this BFS implementation?2 marks
- 20Explain breadth-first search and its queue operations.5 marks
- 21Which data structure distinguishes ordinary BFS from iterative DFS?2 marks
- 22Compare DFS and BFS with the same graph.5 marks
- 23Name operations of a basic graph ADT.2 marks
- 24Explain a graph ADT and applications of graphs.5 marks
- 25Why is the supplied flight network directed?2 marks
- 26Represent the supplied five-city flight network as a directed graph, matrix and lists.5 marks
No matching questions. Change the search or marks filter.
The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.