Questions Solved Correctly To Score
A+ 2025
What is an external sorting algorithm? CORRECT ANSWERS Algorithm that uses tape
or disk during the sort
What is an internal sorting algorithm? CORRECT ANSWERS Algorithm that uses main
memory during the sort
What is the advantage of bubble sort over other sorting techniques? CORRECT
ANSWERS Detects whether the input is already sorted
The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How
many iterations will be done to sort the array? CORRECT ANSWERS 4
What is an in-place sorting algorithm? CORRECT ANSWERS It needs O(1) or O(logn)
memory to create auxiliary locations
In the following scenarios, when will you use selection sort? CORRECT ANSWERS
Large values need to be sorted with small keys
What is the advantage of selection sort over other sorting techniques? CORRECT
ANSWERS It requires no additional storage space
What is the disadvantage of selection sort? CORRECT ANSWERS It is not scalable
The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and
selection sort respectively are, CORRECT ANSWERS 5 and 4
The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable).
The number of iterations in selection sort and bubble sort respectively are, CORRECT
ANSWERS 4 and 1
Consider an array of elements arr[5]= {5,4,3,2,1} , what are the steps of insertions done
while doing insertion sort in the array. CORRECT ANSWERS (A) 4 5 3 2 1
34521
23451
12345
What are the correct intermediate steps of the following data set when it is being sorted
with the Insertion sort?15,20,10,18 CORRECT ANSWERS A. 15,20,10,18 --
10,15,20,18 -- 10,15,18,20 -- 10,15,18,20
, Consider the following lists of partially sorted numbers. The double bars represent the
sort marker. How many comparisons and swaps are needed to sort the next number. [1
3 4 8 9 || 5 CORRECT ANSWERS B. 3 comparisons, 2 swaps
Consider the following lists of partially sorted numbers. The double bars represent the
sort marker. How many comparisons and swaps are needed to sort the next number. [1
3 4 5 8 9 || 2] CORRECT ANSWERS C. 6 comparisons, 5 swaps
What operation does the Insertion Sort use to move numbers from the unsorted section
to the sorted section of the list? CORRECT ANSWERS Swapping
Searching and sorting algorithms are best implemented with which data structure?
CORRECT ANSWERS A. An array-based list
B. A linked list
What is the key used in a search algorithm? CORRECT ANSWERS Used in operations
such as searching, sorting, inserting and deleting
Which search algorithm is best for a large list? CORRECT ANSWERS Binary search
A binary search algorithm can be best described as what? CORRECT ANSWERS A
divide and conquer technique
On average, a sequential search algorithm would make N/2 number of comparisons for
a list of size N. CORRECT ANSWERS True
The following best describes which algorithm? The elements are compared and
swapped if the first is found to be greater than the second. CORRECT ANSWERS
Bubble sorting algorithm
The purpose of the bubble sorting algorithm is what? CORRECT ANSWERS A. To
speed up the search of an item in the list
B. To sort the contents of the list
A selection sort algorithm sorts the list by which method? CORRECT ANSWERS
Finding the smallest element in the list and moving this to the beginning of the unsorted
list
The insertion sort algorithm improves on the selection sort method by reducing the
number of comparisons. CORRECT ANSWERS True
The quick sort algorithm divides the list into two sub lists, then sorts each sub lists, and
then combines both sub lists. CORRECT ANSWERS True