9.3k views
1 vote
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

User Myworld
by
5.1k points

1 Answer

7 votes

Answer:

B. False

Step-by-step 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.

User Laneisha
by
4.8k points