(a)
Trace the action of the binary search algorithm (Algorithm11.5.1) on the variables index, bot, top, mid, and thegiven values of x for the input array a [1] = Chia, a [2] = Doug, a [3] = Jan, a [4] = Jim, a [5] = José, a [6] = Mary, a [7] = Rob, a [8] = Roy, a [9] = Sue, a [10] = Usha, where alphabeticalordering is used to compare elements of the array.
(b)
Trace the action of the binary search algorithm (Algorithm11.5.1) on the variables index, bot, top, mid, and thegiven values of x for the input array a [1] = Chia, a [2] = Doug, a [3] = Jan, a [4] = Jim, a [5] = José, a [6] = Mary, a [7] = Rob, a [8] = Roy, a [9] = Sue, a [10] = Usha, where alphabeticalordering is used to compare elements of the array.
Want to see the full answer?
Check out a sample textbook solutionChapter 11 Solutions
DISCRETE MATHEMATICS WITH APPLICATION (
- Fill in the blanks to describe squares. The square of a number is that number Question Blank 1 of 4 . The square of negative 12 is written as Question Blank 2 of 4 , but the opposite of the square of 12 is written as Question Blank 3 of 4 . 2 • 2 = 4. Another number that can be multiplied by itself to equal 4 is Question Blank 4 of 4 .arrow_forward12) The prime factors of 1365 are 3, 5, 7 and 13. Determine the total number of divisors of 1365.arrow_forward11) What is the sum of numbers in row #8 of Pascal's Triangle?arrow_forward
- 14) Seven students and three teachers wish to join a committee. Four of them will be selected by the school administration. What is the probability that three students and one teacher will be selected?arrow_forward(1) Write the following quadratic equation in terms of the vertex coordinates.arrow_forwardNo chatgpt pls will upvote Already got wrong chatgpt answerarrow_forward
- Elements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning