Q1:

2026: 21 May Shift 1

Sorting

Easy

Computer Science

Any algorithm that has a loop (usually 1 to n) will have the time complexity as ________.

Answer options
Option 1
Correct Answer
Explanation for 2026: 21 May Shift 1 CSE question 1

Q2:

2026: 20 May Shift 1

Sorting

Hard

Computer Science

Given an array as [22, 20 30, 10, 2, 8]. What will be the position of element 2 after 2 iterations of selection sort and insertion sort, respectively?

Note: Indexing of the array starts from 0.

(A) 0

(B) 3

(C) 4

(D) 5

Answer options
Option 2
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 2

Q3:

2026: 20 May Shift 1

Sorting

Easy

Computer Science

The technique that sorts an array by comparing adjacent elements and swapping them if they are unordered is __________.

Answer options
Option 3
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 3

Q5:

2026: 20 May Shift 1

Sorting

Medium

Computer Science

Consider an array [22, 20, 30, 10, 2, 8]. What will be the array after 2 passes of bubble sort?

Answer options
Option 4
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 5

Q7:

2026: 19 May Shift 1

Sorting

Easy

Computer Science

Which of the following statements are correct?

(A) The bubble Sort technique sorts a given list of elements by repeatedly comparing the adjacent elements and swapping them if they are unordered.

(B) The process of placing or rearranging a collection of elements into a particular order is known as sorting.

(C) In selection Sort, the smallest element is selected from the unsorted array and swapped with the leftmost element.

(D) Complexity analysis does not depend on size of input.

Answer options
Option 2
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 7

Q8:

2026: 19 May Shift 1

Sorting

Easy

Computer Science

With which of the following sorting techniques, the list is divided into two parts - one of sorted elements and another of unsorted elements. Each element in the unsorted list is considered one by one and is inserted into the sorted list at its appropriate position. At each pass, the sorted list is traversed from the backward direction to find the position where the unsorted element could be inserted.

Answer options
Option 3
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 8

Q9:

2026: 19 May Shift 1

Sorting

Medium

Computer Science

Consider a list of elements:

numList =[8,7,13,1,-9,4].

Determine the partially sorted list after three complete passes of the list using insertion sort.

Answer options
Option 4
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 9

Q10:

2026: 18 May Shift 2

Sorting

Medium

Computer Science

Given below is the code for Selection sort procedure:

SELECTIONSORT( numList, n)

Step 1: SET i=0

Step 2: WHILE i< n REPEAT STEPS 3 to 11

Step 3: SET min = i, flag = 0

Step 4: _______________

Step 5: WHILE j<="" p="">

Step 6: ___________________________

Step 7: min=j

Step 8: __________

Step 9: IF flag=1 THEN

Step 10: swap(numList[i],numList[min])

Step 11: ________________________

Arrange the options given below in order to fill in the blanks in the above code.

A. SET i=i+1

B. SET j= i+1

C. IF numList[j] < numList[min] THEN

D. flag=1

Answer options

Q11:

2026: 18 May Shift 2

Sorting

Easy

Computer Science

Complexity Analysis of algorithms is performed to explain how an algorithm will perform when the input _______________.

Answer options

Q12:

2026: 18 May Shift 2

Sorting

Medium

Computer Science

Match the LIST-I with LIST-II

LIST-ILIST-II
A.Bubble sortI.Repeatedly compare adjacent elements
B.Insertion sortII.Constant time algorithms
C.Algorithm with nested loopIII.Quadratic time algorithms
D.Algorithms with no loopsIV.Places elements in sorted list one by one
Answer options

Q13:

2026: 18 May Shift 2

Sorting

Medium

Computer Science

What will be the result after second pass of bubble sort for an unsorted list given as follows?

[8,7,13,1,-9,4]

Answer options

Q14:

2026: 13 May Shift 2

Sorting

Medium

Computer Science

Consider the 'numList' having the elements as follows:

numList =[9,8,12,1,-8,3].

What will be the partially sorted list after three complete passes of Bubble sort?

Answer options

Q16:

2026: 13 May Shift 2

Sorting

Easy

Computer Science

The process of ordering or arranging a given collection of elements in some particular order is called ____________.

Answer options

Q17:

2026: 13 May Shift 2

Sorting

Medium

Computer Science

Identify the number of swaps required for sorting the list 'num' using selection sort.

num=[63,42,21,9]

Answer options

Q18:

2026: 11 May Shift 2

Sorting

Medium

Computer Science

What is the status of list after PASS-3 using Insertion Sort on the List [8,7,13,1,-9,4] ?

Answer options

Q19:

2026: 11 May Shift 2

Sorting

Easy

Computer Science

______________ sort places the element of a list at its suitable place in each pass. It is similar to the placing of cards at its right position while playing cards.

Answer options

Q20:

2026: 11 May Shift 2

Sorting

Easy

Computer Science

____________ is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements in case they are unordered in n-1 passes.

Answer options

Q21:

2026: 11 May Shift 2

Sorting

Medium

Computer Science

Assume that bubble sort is applied on the array [9,7,14,3,-7,5].

Arrange the following outputs of different passes in their correct order.

A. [-7,3,5,7,9,14]

B. [3,-7,5,7,9,14]

C. [7,3,-7,5,9,14]

D. [7,9,3,-7,5,14]

Answer options

Q22:

2025: 3 June Shift 2

Sorting

Easy

Computer Science

If the list have 'n' elements then how many passes/iteration will the selection sort take to sort the array?

Answer options

Q23:

2025: 3 June Shift 2

Sorting

Medium

Computer Science

Which of the following sorting algorithm has a worst case time complexity O(n2)O(n^2) but performs well when the array is nearly sorted?

Answer options

Q24:

2025: 3 June Shift 2

Sorting

Hard

Computer Science

Consider the following array [8, 7, 13, 1, -9, 4]. After the 4th4^{th} iteration of Bubble sort, how will the array look like?

Answer options

Q25:

2025: 30 May Shift 2

Sorting

Easy

Computer Science

Apply bubble sort technique to sort a list of elements:

numList2 = [8, 7, 6, 5, 4]. Show the positions of elements in the list after pass 1.

Answer options

Q26:

2025: 30 May Shift 2

Sorting

Medium

Computer Science

Identify the purpose of the given algorithm :

Step 1: SET i = 0

Step 2: WHILE i< n, REPEAT STEPS 3 to 8

Step 3: SET j = 0

Step 4: WHILE j< n-i-1, REPEAT STEPS 5 to 7

Step 5: IF numList[j] < numList[j+1] THEN

Step 6: swap(numList[j], numList[j+1])

Step 7: SET j=j+1

Step 8: SET i=i+1

Answer options

Q27:

2025: 30 May Shift 2

Sorting

Medium

Computer Science

In the following list, bubble sort technique has been applied to sort a list of elements.

numList2 = [8, 7, 6, 5, 4]

Arrange the list after each pass in order :

(A) [7, 6, 5, 4, 8]

(B) [5, 4, 6, 7, 8]

(C) [8, 7, 6, 5, 4]

(D) [6, 5, 4, 7, 8]

Answer options

Q28:

2025: 27 May Shift 2

Sorting

Medium

Computer Science

In the context of the Selection Sort Algorithm for ascending order, arrange the following sequences:

(A) The list is considered to be divided into two lists - the left list contains sorted elements, while the right list contains unsorted elements.

(B) The smallest element is then swapped with the leftmost element of the unsorted element.

(C) This process 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.

Answer options

Q29:

2025: 27 May Shift 2

Sorting

Easy

Computer Science

Time Complexity of Insertion Sort having 'n' elements in the list in the worst case is:

Answer options

Q30:

2025: 27 May Shift 2

Sorting

Medium

Computer Science

For the list [35, 9, 12, 51, 32, 21], how will the list elements look like after second pass in Bubble Sort?

Answer options