CSC508 TEST2 12july2023
CSC508 TEST2 12july2023
INSTRUCTIONS TO CANDIDATES
QUESTION 1 20
QUESTION 2 20
QUESTION 3 20
QUESTION 4 20
TOTAL SCORE 80
CS/JULY2023/CSC508/TEST 2
4 8 12 23 39 45 49 55 60 68 73 75 80 97 132
How many comparisons are required to find whether items 73 and 99 are in the list?
a) Using Sequential Search algorithm? (5 marks)
b) Using Binary Search algorithm? (5 marks)
550
30 80
46 65
15
50
i. Insert value 48 into the AVL Tree above. The resulting tree must also be an AVL
tree.
(5 marks)
ii. What are the balance factors at each node after the insertion in (i).
(5 marks)