Advertisements
Advertisements
Question
Which statement is false?
Options
Bubble sort needs a nested loop.
Selection sort needs a nested loop.
Linear search needs a nested loop.
MCQ
Advertisements
Solution
Linear search needs a nested loop.
Explanation:
- Bubble sort and selection sort use nested loops to compare and arrange elements.
- Linear search checks elements one by one using a single loop, so it does not need a nested loop.
shaalaa.com
Is there an error in this question or solution?
Chapter 8: Arrays - Sort & Search - Exercises [Page 196]
