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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

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
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 40 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 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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply