Question
35 162 7 141 141 11 85 63 87 64 88 156 128 81 55 38 90 87 30 34 79 40 168 107 131
35 162 7 141 141 11 85 63 87 64 88 156 128 81 55 38 90 87 30 34 79 40 168 107 131 139 84 198 159 157 155 136 100 144 11 34 97 60 109 188 25 37 137 164 59 111 65 125 200 77
a. Create an array A by randomly select 15 numbers from the list of 50 integers above. Show the array A that you selected.
b. Sort A with non-decreasing order. Show the value X and Y, which are the smallest and largest numbers in the array A after sorting.
c. Do a binary search on the array for the value of Z. In which Z is the largest integer that is smaller than (X + Y)/3. Draw the binary tree used in the search.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started