Advertisements
Advertisements
Question
Which statement is true?
Options
Bubble sort can arrange an array in only ascending order.
Binary search can work on any array.
Linear search does not need the array to be arranged in any order.
MCQ
Advertisements
Solution
Linear search does not need the array to be arranged in any order.
Explanation:
- Linear search checks each element one by one, so the array can be sorted or unsorted.
- Bubble sort can sort in ascending or descending order, and binary search works only on a sorted array.
shaalaa.com
Is there an error in this question or solution?
Chapter 8: Arrays - Sort & Search - Exercises [Page 196]
