DATA STRUCTURES AND ALGORITHMS questions answers
UNIT NAME: DATA STRUCTURES AND ALGORITHMS
QUESTION 1
(a) Define the following terms as used in trees: (3 marks)
(i) Child
(ii) Parent
(iii) Traversal
) For the following graph find the adjacency matrix and adjacency list representation of the graph. (7 marks)
Adjacency List representation
Adjacency Matrix
(c).Using relevant algorithms explain the two problems with stack ADT (5 marks)
Problems:
QUESTION 2
Suppose the following list of numbers is inserted in order into an empty binary search
tree:45, 33, 90, 34, 68, 72, 15, 24, 30, 66, 11, 50, 10
(a) Construct the binary search tree.
(b) Find the in: (6 marks)
(i) In order
(ii) Preorder and
(iii) Post order traversal of the BST created.
c) Outline fiveapplications of List data structure (5 marks)
11 years ago
Purchase the answer to view it
- data_structures_and_algorithms_questions_answers.docx