swerve2985 swerve2985
  • 25-07-2019
  • Computers and Technology
contestada

Which element would the search element be compared to first, if abinary search were used on the list above?

4
35
44
98

Respuesta :

KrystaCort KrystaCort
  • 31-07-2019

Answer:

35

Explanation:

Binary search is more efficient than linear search,time complexity of binary is 0(logn) where as linear's 0(n).In binary search we search from the middle of the array,whereas in linear we start with index 0 until the last.

4

35

44

98

List contains 4 elements, for finding the middle element we will divide by 2 .

4/2=2 so at the index 2 -35 is present ,we will start checking from 35.  

Answer Link

Otras preguntas

P=25 watts W=5000 joules t=? what is time
What is 5.8 × 106 mg/s in grams per minute?
Solve the system using elimination.7x + 5y = 15–6x – 4y = –14 A.(–6, 7)B.(5, -4)C.(7, –7)D.(–4, 5)
What term describes biotic effects that increase in intensity as the population in an area increases?
10 facts about wilfred owen
What is the relationship between the 6s in the number 660,472?
A computer's fan rotates 2000 times in 40 seconds. Find the unit rate in rotations per second.
Solve by factoring the equation x^2+36=12x
What is the difference between Weight and Mass?Please give a fair amount of detail!
how was palace of Versailles a perfect example of baroque art?