Question 4 You are given an array: 10, 4, 12, 3, 5, 11 a. show all the comparisons needed if you were to search for 19 i

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

Question 4 You are given an array: 10, 4, 12, 3, 5, 11 a. show all the comparisons needed if you were to search for 19 i

Post by answerhappygod »

Question 4 You Are Given An Array 10 4 12 3 5 11 A Show All The Comparisons Needed If You Were To Search For 19 I 1
Question 4 You Are Given An Array 10 4 12 3 5 11 A Show All The Comparisons Needed If You Were To Search For 19 I 1 (72.9 KiB) Viewed 38 times
Question 4 You are given an array: 10, 4, 12, 3, 5, 11 a. show all the comparisons needed if you were to search for 19 if the above array is representing a BST b. Explain why BST sometimes can have better performance than doing search in a linked list (Use searching 19 in the sequence as an example. Illustrate how many comparisons each approach needs) Please start a new line for each subquestion and mark your answer for each subquestion with the question number in the front. For example: a. X vs. Y b. Explanation Selected Answer: [None Given) Question 5 When doing HeapSort, must be used to put 27, 88, 18, and 33 into descending order. Selected Answer: MinHeap Answers MinHeap Both MinHeap and MaxHeap can be used Neither MinHeap nor MaxHeap can be used MaxHeap Question 6 Read the algorithm below: Algorithm getMystery(Root) left = 0; right = 0; if (Root.left = null) left = getMystery(Root.left): if (Root.right = null) right = getMystery(Root.right); return 1+ Max(left, right); Assume Root is the root of a binary tree. "Max" is a method that find the maximum value in the parameters. What is the general functionality of the algorithm getMystery? Selected Answer: [None Given]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply