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

Can you please help me??
What reaction will take place if ethyl alcohol is added to a solution of hcξc:- na+ in liquid ammonia?
When a parent argues that his or her child has simply fallen in with a bad crowd, what theory of deviance is he or she expressing?
The aluminum foil on a certain roll has a total area of 18.5 m 2 and a mass of 1275 g. using a density of 2.7 g per cubic centimeter for aluminum, determine the
"true or false? mobile devices do not require ip addresses to communicate on the internet. ""
which expression is equivalent to 27 + 15
f(x) =x+5 what is ordered pair for the point on the graph when x=4w
Which statements accurately describe debts and deficits? Check all that apply. Debt is free and does not affect a government. A government's budget deficit cau
True or false: male and female embryos look the same anatomically at five weeks of pregnancy.
What type of word relationship does this analogy show? dissolve::solidify::noise::silence