Question
Computer Science Question on Sorting
Which statement is incorrect in relation to searching an element in a list :
A
Linear search checks the elements of a list, one at a time, without skipping any element
B
Binary search divides the list into two and check the element accordingly
C
Binary search always works on sorted list either ascending or descending
D
Linear search can be performed only if the list is sorted either ascending or descending
Answer
Linear search can be performed only if the list is sorted either ascending or descending
Explanation
Solution
The correct option is (D) :Linear search can be performed only if the list is sorted either ascending or descending