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

Units and graphs (1.03)
What does p(b|a) represent? the probability of event a or event b or both occurring. the probability of event a and event b both occurring. the probability of e
In the gift shop of the military museum, elliott bought a kit to make a model of a fighter plane. the actual plane is 21 feet long with a wingspan of 17.5 feet.
Products are invented and revised by which department? marketing production research and development finance 2. what is the industry newsletter called? capstone
Help FOR ALL WILL MARK BRAINLIEST
What attractive force draws in surrounding electrons for chemical bonds?
Write an essay stating your position on whether or not patience is required to achieve one’s goals.
How many NEUTRONS does an element have if it’s atomic number is 44 and it’s mass number is 154 ?
I need to know the area of the walkway and how you got the answer
3x+178=6x+238 ayuda please