Question: Help!! 15. (15 points) Briefly describe the problem this code is solving in the text box below. (Hint: Describe the purpose, inputs, outputs algorithm Big-oh)
15. (15 points) Briefly describe the problem this code is solving in the text box below. (Hint: Describe the purpose, inputs, outputs algorithm Big-oh) public static void WhatHappens (intl 1 array, int lowerbound, int upperbound, int key) int position; int comparisoncount = 1; // counting the number of comparisons (optional) // To start, find the subscript of the middle position position = ( lowerbound + upperbound) / 2; while ((array [position] != key) && (lowerbound key.. // decrease position by one. upperbound = position- 1; else lowerbound- position 1; // Else, increase position by one. position = (lowerbound + upperbound) / 2; if (lowerbound
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
