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
Use the grouping method to factor the polynomial below completely 3x^3+9x^2+5x+15​
Tomtit [17]

Answer:

(x+3)( 3x^2 +5)

Step-by-step explanation:

3x^3+9x^2+5x+15​

Split into two groups

3x^3+9x^2     +5x+15​

Factor 3x^2 out of the  first group and 5 out of the second group

3x^2 ( x+3)  + 5(x+3)

Factor out x+3

(x+3)( 3x^2 +5)

6 0
3 years ago
5. What is the multiple zero and multiplicity of f(x) = (x + 4)(x - 2)(x + 4)(x + 4)?
natali 33 [55]

The zeros of this functions are -4, 2, -4, and -4.

-4 is a multiple zero and has multiplicity 3.

2 is a zero.  I would call it a simple zero, since it's only a zero once (AKA has multiplicity of 1).

Is this a "pick one answer" or "pick all correct answers"?

3 0
3 years ago
Explain how to use a horizontal number line<br> to order four fractions from least to greatest.
horsena [70]

Answer:

To order fractions from least to greatest, start by finding the lowest common denominator for all of the fractions. Next, convert each of the fractions by dividing the lowest common denominator by the denominator and then multiplying the top and bottom of the fraction by your answer.

Step-by-step explanation:

Solution for the above problem: We first find the least common denominator by finding the least common multiple for 4, 3, 2, 6, and 8. We find the LCM by the prime factorization method. Next, place the fractions in order from least to greatest.

4 0
3 years ago
What is the axis of symmetry gor Graph A​
Lady_Fox [76]

Answer:

X=-2

Step-by-step explanation:

The axis of symmetry for any parabola is the x value of the vertex. Dividing the parabola along the vertex will always yield two symmetric halves.

7 0
4 years ago
Marely walked around 2 rectangular parks. One measures 54 feet by 38 feet and the other measures 32 feet by 22 feet.
galben [10]

Answer:

130 feet or 39.6m

Step-by-step explanation:

for Marely's first rectangular park, L=54 and B= 38

Total perimeter of distance walked in first rectangular park is 2(L+B), which is 2(54+38) =184 feet

For Marely's second rectangular park, L= 32 and B=22

Total perimeter of second distance 2(L+B), which is 2(32+22) = 108 feet

Total perimeter covered by Marely = (P1+P2) 184+108 = 292 feet

Marely's brother = 2(L+B)

2(48+33) = 162 feet

Hence, difference is 292-162 = 130 feet or 39.6m

3 0
3 years ago
Other questions:
  • The graph shows the solution to which system of inequalities?
    9·1 answer
  • Which of the following points is a solution of y &gt; |x| + 5?
    13·2 answers
  • Draw and label a tape diagram to subtract 10, 20, 30
    8·1 answer
  • Starlight tree farms sells douglas firs and noble first one December they sold 139 more douglas first than noble firs the total
    13·1 answer
  • The point P(21,35) is on the terminal side of an angle in standard position. What is the distance from P to the origin?
    15·1 answer
  • Use completing the square to solve for x in the equation (c+7)(x-9)=25
    12·1 answer
  • There are three square gardens whose lengths of the sides are 3 ft, 7ft, and 2 ft respectively. Find the total area of the three
    5·1 answer
  • PLS HELP ME I CANT DO IT AND JMBEING TIMED
    15·1 answer
  • Angle a and angle b are verticle angles if m <br> PLEASE HELPLO
    11·1 answer
  • List the numbers in order from least to greatest.<br><br> −2, 8, −15, −9, 3, 1
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!