1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
melisa1 [442]
3 years ago
11

Consider an array of integers consisting of the numbers: 8 12 19 32 45 55 67 72 89 90 92. Suppose the binary search algorithm is

applied to this list to search for the key 56 ( not in the list). Answer the following questions: What is the index of the first element in the array that is compared with the key and how is this index evaluated
Computers and Technology
1 answer:
ankoles [38]3 years ago
6 0

Answer:

Answered below

Explanation:

Index of the first element compared to the key is 5. The element itself is 55.

This index is evaluated by the addition of the index of the first element which is 0(zero) and the the index of the last element which is 10.

( Index of the last element is determined by subtracting the one from the total number of elements)

After the addition, the result is divided by 2 to get the first index from which the binary search begins.

firstIndex = 0

lastIndex = array.length - 1

midpoint = (firstIndex + lastIndex) / 2

You might be interested in
How people select, interpret, remember, and use information to make judgments and decisions is called __________.
Svetradugi [14.3K]

Answer: Social Cognition

Explanation: hope this helps

6 0
4 years ago
Use the drop-down menu to complete the sentences about the benefits of flowcharts.
mojhsa [17]

Answer:

c,a,c using the drop down menus edge 2021

GOODLUCK

Explanation:

4 0
3 years ago
Four possible skills a person could have
cluponka [151]

Answer:

Active listening skills.

Genuine interest in others.

Flexibility.

Good judgment.

Explanation:

4 0
4 years ago
What should you do when an error message pops up on the screen?
gladu [14]
D.) Write down the error message and research the cause based on the message.
5 0
3 years ago
Read 2 more answers
In powerpoint a point is _____ of an inch in height.
USPshnik [31]
 a fraction

I think it is correct.

Hopefully it helps.
6 0
3 years ago
Other questions:
  • How does coding work on computers?
    6·1 answer
  • Merge arrays A and B into array C using merge sort algorithm. Give final sorted numbers of C using colored numbers without showi
    13·1 answer
  • What type of identity theft occurs when a thief spends another person's money or opens a line of credit in their name?
    8·2 answers
  • Consider the following implementation of a class Square:
    12·1 answer
  • Summary In this lab, you declare and initialize variables in a C++ program. The program, which is saved in a file named NewAge.c
    5·1 answer
  • Walmart store wants to compare the sales of five of its stores. Write a complete program to ask the user to enter the sales for
    12·1 answer
  • What is conference proceeding​
    10·2 answers
  • Complete the procedure for pasting content from a Word document in a message by selecting the correct term from
    7·2 answers
  • Help fast fast anyone
    10·1 answer
  • 8) how many nanoseconds does it take for a computer to perform one calculation if it performs 6.7 x 107 calculations per second?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!