- 3 A Show How Binary Search Works When Searching For 17 In The Following Array 10 12 14 1 5 6 9 5 Marks B What Is 1 (137.16 KiB) Viewed 41 times
3. (a) Show how binary search works when searching for 17 in the following array: 10 12 14 1 5 6 9 (5 marks) (b) What is
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
3. (a) Show how binary search works when searching for 17 in the following array: 10 12 14 1 5 6 9 (5 marks) (b) What is
3. (a) Show how binary search works when searching for 17 in the following array: 10 12 14 1 5 6 9 (5 marks) (b) What is a binary search tree (BST)? Mention any specific advantage or possible disadvantage. What is the complexity of searching a BST? (c) Write in pseudocode the algorithm for searching a BST. 17 32 (6 marks) (d) Given the following binary search tree, show how it would be modified by inserting 54. 44 48 50 17 21 78 62 (6 marks) 88 (5 marks) (e) What is an AVL-tree? Include in your answer the idea of a rotation. Show how the tree that results from inserting 54 in part (d) would be rebalanced if it were an AVL-tree. (11 marks)