Computer Science · Data Structures and Algorithms
Binary search is often preferred over linear search due to fewer iterations and faster execution. However, it comes with certain limitations. Which of the following statements is true regarding binary search?
- 1Linear search is always slower than binary search, regardless of whether the dataset is sorted or unsorted.
- 2Binary search is faster than linear search because it repeatedly divides the search interval, achieving O(log n) complexity, but this advantage vanishes if the data is unsorted.✓
- 3Binary search requires a sorted list, but its time complexity in the worst case is still O(n).
- 4Binary search can be applied directly on any dataset, sorted or unsorted, as long as the dataset size is known in advance.
Correct answer
Binary search is faster than linear search because it repeatedly divides the search interval, achieving O(log n) complexity, but this advantage vanishes if the data is unsorted.
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Data Structures and Algorithms?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Data Structures and Algorithms