ethepn3490 ethepn3490
  • 11-08-2020
  • Computers and Technology
contestada

Performing binary search on an unsorted list will always return the correct answer in O(n) time where n is the length of the list.
a) true
b) false

Respuesta :

ProfChris1
ProfChris1 ProfChris1
  • 16-08-2020

Answer:

B. False

Explanation:

Binary search does not work in an unsorted list, therefore it will not return the correct answer in 0(n) time.

For an unsorted list, linear search is the better way of searching for algorithms.

For a binary search, it goes through a sorted list to locate a desired element. It repeats its processes until it picks the correct element it is looking for.

Answer Link

Otras preguntas

What is the value of
If the designer measures the pond and determines that the length of the pond across is 400 feet wide, what is the length of the radius?
A student uses a lever and fulcrum to lift a rock off the ground. Which option describes when potential energy is converted into kinetic energy during this proc
PLEASE HELP I NEED IT ASAP PLS IM SO FRUSTRATED THAT NO ONE WILL HELP ME PLEASE NO LINKS NOT BOTS OR JUST ANSWERING TO GET POINTS I WILL REPORT JUST PLS HELP ME
Help plzzzz!!!!!!!???!!!!!
What camera lens is between 45-60mm.
Solve each of these equations. Explain or show your reasoning. 2(x+5)=3x+1 3y−4=6−2y 3(n+2)=9(6−n)
True or False. The pressure inside a piston is the same in all directions.
Directions: Number the events in order of the act of 1965
-7y-4 = 4y×(8-6)-64 answer fast