Q1:
2026: 31 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Which of the following is the worst case scenario for the Insertion sort algorithm, when the array needs to be sorted in ascending order?
2026: 31 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Which of the following is the worst case scenario for the Insertion sort algorithm, when the array needs to be sorted in ascending order?
2026: 31 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Match the LIST-I with LIST-II
| LIST-I | LIST-II | ||
|---|---|---|---|
| A. | Bubble sort | I. | Works by repeatedly swapping the adjacent elements in case they are unordered in n-1 passes |
| B. | Linear search | II. | Exhaustive searching technique where every element of a given list is compared with the item to be searched |
| C. | Insertion sort | III. | Similar to the placing of cards at its right position while playing cards |
| D. | Binary search | IV. | Comparisons that do not find the key still give us idea about the location where the key may probably be found |
2026: 31 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Identify the sorting technique :
In this, the smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array. The process continues for the next element in the unsorted array till the list is sorted.
2026: 31 May Shift 1
Computer Science
Sorting
Medium
Computer Science
What will be status of the array [8, 7, 13, 1, -9, 4], after the third pass of Bubble sort?
2026: 29 May Shift 2
Computer Science
Sorting
Easy
Computer Science
Arrange the following algorithms in increasing order of their complexities.
A. Linear time algorithms
B. Quadratic time algorithms
C. Constant time algorithms
D. Cubic time algorithms
2026: 29 May Shift 2
Computer Science
Sorting
Medium
Computer Science
Consider the following array 'numList':
| numList | 8 | 7 | 13 | 1 | -9 | 4 |
|---|---|---|---|---|---|---|
| Index | 0 | 1 | 2 | 3 | 4 | 5 |
Arrange the following outputs of various passes as they occur when we apply 'Bubble sort' on the given array numList.
A. -9, 1, 4, 7, 8, 13
B. 7, 8, 1, -9, 4, 13
C. 1, -9, 4, 7, 8, 13
D. 7, 1, -9, 4, 8, 13
2026: 29 May Shift 2
Computer Science
Sorting
Medium
Computer Science
Consider the given array:
[15,10,12,11]
What will be the position of the following elements in the array after the first pass using the selection sort?
A. 15
B. 10
C. 12
D. 11
2026: 29 May Shift 2
Computer Science
Sorting
Medium
Computer Science
In bubble sort, how many passes will be needed to sort the array [12, 17, 34, 8]?
2026: 29 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Given : numList = [8, 7, 13, 1, -9, 4] having 6 elements.
How many number of passes required to sort numList using selection sort?
2026: 29 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Given the function code:
def Sort(list1):
n = len(list1)
for i in range(n):
for j in range(0, n-i-1):
if list1[j] > list1[j+1] :
list1[j], list1[j+1] = list1[j+1], list1[j]
Identify the type of sort being done in the above code:
2026: 29 May Shift 1
Computer Science
Sorting
Medium
Computer Science
Arrange the working of Selection Sort on a list in ascending order.
(A) The list is divided into two lists - the left list containing the sorted elements, and the right list containing the unsorted elements. Initially, the left list is empty, and the right list contains all the elements.
(B) The smallest element is swapped with the leftmost element of the unsorted list, occupies the first position in the sorted list, and is not considered in further passes.
(C) The process of finding smallest and swapping continues until n-1 smallest elements are found and moved to their respective places.
(D) All the elements in the unsorted list are traversed to find the smallest element.
2026: 29 May Shift 1
Computer Science
Sorting
Easy
Computer Science
In ______________, the smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array. The process continues for the next element in the unsorted array till the list is sorted.
2026: 26 May Shift 1
Computer Science
Sorting
Easy
Computer Science
The number of passes, selection sort makes to sort a list of 'n' elements is ____.
2026: 26 May Shift 1
Computer Science
Sorting
Easy
Computer Science
A loop within a loop will have the time complexity as ____ .
2026: 26 May Shift 1
Computer Science
Sorting
Hard
Computer Science
Consider a numlist = [58, 46, 63, 11, -16, 26]
What will be sequence of following elements after pass 3 of bubble sort?
(A) 46
(B) 26
(C) -16
(D) 11
2026: 26 May Shift 1
Computer Science
Sorting
Medium
Computer Science
Consider the list numlist = [58, 46, 63, 11, -16, 26]. What will be the sequence of elements after pass 3 of Selection sort?
2026: 24 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Which sorting algorithm involves repeatedly selecting the smallest element and placing it in its correct position?
2026: 24 May Shift 1
Computer Science
Sorting
Easy
Computer Science
A loop within a loop will have the time complexity as __________.
2026: 24 May Shift 1
Computer Science
Sorting
Medium
Computer Science
Consider the following numList:
| 8 | 7 | 13 | 1 | -9 | 4 |
|---|
Sequence the following output obtained after each pass of comparison using bubble sort.
(A) 7 8 1 -9 4 13
(B) 7 1 -9 4 8 13
(C) -9 1 4 7 8 13
(D) 1 -9 4 7 8 13
2026: 24 May Shift 1
Computer Science
Sorting
Easy
Computer Science
How many passes are required to sort a list of 6 elements using bubble sort?
2026: 23 May Shift 2
Computer Science
Sorting
Easy
Computer Science
Arrange the following steps of Selection Sort in correct order.
A. Smallest element of the unsorted array is swapped with the leftmost element of the sorted array.
B. The smallest element is selected from the unsorted array.
C. The swapped element becomes a part of the sorted array.
D. The process continues for the next element in the unsorted array till the list is sorted.
2026: 23 May Shift 2
Computer Science
Sorting
Easy
Computer Science
The worst case time complexity of Insertion Sort is _______________.
2026: 23 May Shift 2
Computer Science
Sorting
Medium
Computer Science
What will be the result after 3rd pass of Bubble Sort on the array [5, 1, 4, 2, 8]?
2026: 23 May Shift 1
Computer Science
Sorting
Easy
Computer Science
If a list is having 'n' elements, then how many passes 'Selection Sort' will require to sort the list?
2026: 23 May Shift 1
Computer Science
Sorting
Easy
Computer Science
Insertion sort will have a time complexity of _______________in the worst case.
2026: 23 May Shift 1
Computer Science
Sorting
Medium
Computer Science
After two complete passes of Bubble Sort on the array [7, 2, 9, 4], what will the new order be?
A. 7
B. 2
C. 4
D. 9
2026: 23 May Shift 1
Computer Science
Sorting
Easy
Computer Science
If there is a nested loop and also a single loop, then the time complexity will be estimated on the basis of the _______ loop only.
2026: 21 May Shift 1
Computer Science
Sorting
Medium
Computer Science
Given the array [12, 8, 20, 10]
What will be the sequence of the elements in the array after the first pass using bubble sort?
(A) 12
(B) 8
(C) 20
(D) 10
2026: 21 May Shift 1
Computer Science
Sorting
Easy
Computer Science
_______is performed to explain how an algorithm will perform when the input grows larger.
2026: 21 May Shift 1
Computer Science
Sorting
Medium
Computer Science
Given array [50, 40, 60, 30, 70]
How many passes will be required to sort the array using a selection sort?