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
Solve right triangle ABC given the following: C = 90° , B = 53°, b = 23.
Anastasy [175]
A=17.33174
c=28.79912
A=37
area=199.31505


pls give brainliest if someone else comments :)
7 0
3 years ago
Need help ASAP!!! HAVE QUIZ TOMORROW
Serjik [45]
To solve these problems, you usually have a favor the numerator. For example, on #7, label your terms, 1 from m^2 is A, -6m from -6 is B and your constant, 8, is C. Next you have to find out what two numbers can be multiplied to give you for C term but can also add together to give you your B term. For this specific problem, -4 and -2 gives you 8 and also adds to be -6. After that, you put your -4 and -2 into their own separate parentheses along with the M from M^2. It should look this like: (m-4)(m-2)/(m-2). Now you notice that the binomial on the bottom and one of the binomials on top is the exact same, so you would cancel that out and your answer would be (m-4).
6 0
3 years ago
Someone please help!! ASAP
prohojiy [21]

Answer:

x=−5 and y=1

Step-by-step explanation:

7 0
3 years ago
Write the polar form of a complex number in standard form for <img src="https://tex.z-dn.net/?f=8%5Bcos%28%5Cfrac%7B%5Cpi%7D%7B2
laila [671]

Answer:

Solution : 8i

Step-by-step explanation:

We can use the trivial identities cos(π / 2) = 0, and sin(π / 2) = 1 to solve this problem. Let's substitute,

8\left[cos\left(\frac{\pi }{2}\right)+isin\left(\frac{\pi \:}{2}\right)\right] = 8\left(0+1i\right)

And of course 1i = i, so we have the expression 8(0 + i ). Distributing the " 8, " 8( 0 ) = 0, and 8(i) = 8i, making the fourth answer the correct solution.

7 0
3 years ago
Which of the following is true for this graph? <br><br> Will give brainliest to correct answer.
Contact [7]

The answer is A. Slope is rise/run. According to the graph, you can trace out and see that it rises 1 and goes to the right 4 times. This means that it has a positive slope of 1/4. And the line crosses the y intercept at y = 3

So answer choice A is correct.

7 0
3 years ago
Other questions:
  • There are 18 oranges in box A and 36 in box B, what is the ratio of box A to box B
    12·1 answer
  • Haley measured the distances between her house and two of her friends’ houses. Ellen’s house is 1.41 miles away from Haley’s, an
    6·2 answers
  • PLEASE HELP ASAP 30 POINTS.
    14·2 answers
  • Solve the system of equations. y = 6x - 27 y = 4x - 17 a. ( -5, 3) c. ( 5, 3) b. ( -3, -5) d. No solution Please select the best
    7·1 answer
  • if a piece of string which is 368cm long must be cut into 8 equal pieces how long will each piece be (answer in mm)​
    6·1 answer
  • PLZ HELP!!!
    12·2 answers
  • jose built a patio in his backyard.he use square tiles to build it.he has 4 rows and 3 columns. how many square tiles did jose u
    11·1 answer
  • SCALCET8 3.11.501.XP. Find the numerical value of each expression. (Round your answers to five decimal places.) (a) sinh(ln(4))
    7·1 answer
  • Deena wants to save $175 for a trip to an amusement park. She sets aside $14 of her allowance at the end of each week. How many
    6·1 answer
  • Five Questions FIFTY POINTS...look please don't just get this points I really need help in math rn. tysm for your help really ne
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!