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

(7×8)×10 =_ complete the pattern
The___hypothesis suggests that our solar system evolved from a huge rotating cloud of dust and gas.
A pair of boots has an original price of $95. They are on sale for 35 percent off. What number can you multiply $95 by to equal the discounted price of $61.75?
what is the ratio $32 for 4 people written as a unit rate
Which of the following characteristics of all the states are also shared by the United States? Open borders, government, population, sovereignty, territory, uni
Which two small states are the first to hold their presidential primaries and thus receive a great deal of media attention? A. Nebraska and Virginia B. Iowa and
HMO coverage has much more flexibility than PPO coverage. Please select the best answer from the choices provided. T F
write the number equal to 2 tens 15 ones
How do you simplify three fourths divided by two
In which kind of creation story is there a void or chaos before creation?