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
Stella [2.4K]
3 years ago
12

Suppose you are doing a binary search of the list [15, 18, 2, 19, 18, 0, 8, 14, 19, 14]. How many comparisons would you need to

do in order to find the key 19?
Mathematics
1 answer:
Illusion [34]3 years ago
7 0

Answer:

Three Times.

Step-by-step explanation:

First and foremost a binary search requires that the array be sorted in ascending or descending order.

After the initial step the search goes to the middle most value

i.e. [0, 2,8,14,14,15,18,18,19,19]  

will be the second 14, which is the first iteration.

Since 14 is less than 19 the search will eliminate  the lower half of the including 14, and will iterate again through the array:

[15,18,18,19,19]

The array will go to the middle most value which is 18, second iteration. Since 18 is less than 19, the program will eliminate the lower half and be left with two values i.e. [19,19].

The search will run once i.e. third iteration, and will return key value found.

You might be interested in
I've literally asked this question 5 times lol. Can someone please help me?
Tju [1.3M]
I think i know the answer to that question. just wait for a sec.
6 0
2 years ago
Read 2 more answers
(100 pts.)
ICE Princess25 [194]

Answer:

1260 is the correct answer

remember multiply them :)

Step-by-step explanation:

7 0
2 years ago
Can someone please answer 8|x+2|-6=5|x+2|+3
Anettt [7]

Step-by-step explanation:

8|x+2|-6=5|x+2|+3

|8x+16|-6=|5x+10|+3

I've been thinking... Is that | or (? Are you sure it's |?

Oh well, I'm continuing...

8x+16-6=5x+10+3

8x+10=5x+13

3x=3

x=1

4 0
3 years ago
In the table, x represents the age in years of a collectible baseball card, and y represents its value in dollars. Cost of a Pac
lukranit [14]

Answer:

b

Step-by-step explanation:

The slope is positive because as the age increases, the value increases.

6 0
3 years ago
Read 2 more answers
Wich of the following expressions are equivalent to - 2/3 ? select all that apply​
MrRa [10]

Answer:

A, C and E

Step-by-step explanation:

Simplify each expression to lowest terms. Equivalent expressions will be any expressions which are equal after simplifying to lowest terms.

A. -1/9 * 6 = -6/9 = -2/3

B. -15/10 = -3/2

C. 12/-18 = -2/3

D. -3/4 * 2/1 = -6/4 = -3/2

E. -8/9 * 3/4 = -24/36 = -2/3

7 0
3 years ago
Other questions:
  • Please answer 15 points BEGGING U XD (sorry for bad camera)
    8·2 answers
  • An urn contains 13 red marbles and 14 blue marbles. 16 marbles are chosen at random. what is the probability that 6 red marbles
    13·1 answer
  • 20 PTS see image......................
    14·2 answers
  • Divide Rs240 in the ratio 3:5
    9·1 answer
  • –8(n + 7) >-96??????????????
    11·1 answer
  • What is the equation of the line that passes through the point (6, -6) and has a slope<br> of – 5/3?
    14·1 answer
  • Please helpppp (link)
    5·1 answer
  • Fill in the table. I will pick brainliest.
    6·1 answer
  • Identify the exponential function graphed below. Which of the following is the equation for this graph?
    12·1 answer
  • Write the standard form of the line that passes through the given points. (7, -3) and (4,-8)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!