FBISE, NCP & NBF-aligned resources for Classes 9–12
Browse by Class
Browse by Type
Computer Chapter 2 : Topic 2.3
Choosing Search and Sort Algorithms
1 / 15
Which search algorithm is most suitable when data is unsorted and contains only a small number of elements?
Reasoning: Linear search works directly on unsorted data and is practical for small datasets.
2 / 15
Which searching algorithm should be selected when a large list is already arranged in ascending order?
Reasoning: Binary search efficiently searches sorted data by repeatedly dividing the search range into halves.
3 / 15
A programmer frequently searches student roll numbers stored in sorted order; which algorithm provides better efficiency?
Reasoning: Binary search is preferred for repeatedly searching sorted lists because it eliminates half the remaining elements each step.
4 / 15
Why is binary search generally unsuitable for directly searching values stored in an unsorted array?
Reasoning: Binary search compares with the middle element, so ordered data is necessary to decide which half to search.
5 / 15
Which search method is appropriate when checking whether a particular name exists within an unordered short list?
Reasoning: Linear search checks items sequentially and does not require the list to be sorted beforehand.
6 / 15
Which sorting algorithm is particularly suitable when a list is already mostly sorted with few misplaced elements?
Reasoning: Insertion sort performs efficiently on nearly sorted data because relatively few element movements are required.
7 / 15
A teacher adds new marks one by one while maintaining sorted order; which sorting method is appropriate?
Reasoning: Insertion sort places each new value into its correct position within the already sorted portion.
8 / 15
Which sorting algorithm repeatedly compares neighbouring elements and swaps them whenever they appear in incorrect order?
Reasoning: Bubble sort repeatedly compares adjacent elements and swaps them until the entire list becomes sorted.
9 / 15
Bubble sort is most appropriate for which situation when simplicity is more important than high performance?
Reasoning: Bubble sort is simple to understand and implement, making it suitable for small datasets despite lower efficiency.
10 / 15
Which algorithm should be avoided for very large datasets because repeated adjacent comparisons can make sorting inefficient?
Reasoning: Bubble sort may require many passes and comparisons, making it inefficient for large datasets.
11 / 15
A program must find one value in ten unsorted numbers only once; which method is most practical?
Reasoning: For a small unsorted list searched only once, sorting first would add unnecessary processing.
12 / 15
Which approach is more suitable when the same large collection must be searched repeatedly for different values?
Reasoning: Sorting once allows repeated binary searches, which is usually more efficient than repeated linear searches.
13 / 15
Which sorting algorithm gradually builds a sorted section by inserting each unsorted element into its proper position?
Reasoning: Insertion sort expands the sorted portion by inserting each next element into its correct location.
14 / 15
Which condition gives binary search its main advantage over linear search when locating a required element?
Reasoning: Sorted order allows binary search to discard half of the remaining search area after each comparison.
15 / 15
A beginner needs an easily implemented sorting method for a short classroom dataset; which algorithm is suitable?
Reasoning: Bubble sort is straightforward, easy to trace, and appropriate for demonstrating sorting on small datasets.
Your score is
Restart quiz