...
Question 14192 – NIC-NIELIT STA 2020
December 1, 2023
Question 14197 – NIC-NIELIT STA 2020
December 1, 2023
Question 14192 – NIC-NIELIT STA 2020
December 1, 2023
Question 14197 – NIC-NIELIT STA 2020
December 1, 2023

Question 14193 – NIC-NIELIT STA 2020

The given array is arr = {1, 2, 4, 3}. Bubble sort is used to sort the array elements. How many passes will be done to sort the array?

Correct Answer: C

Question 115 Explanation: 
Bubble sort will take the worst case in n-1 comparisons but as per the input it takes only one pass.


Note: Official answer key given, Option-D as the correct answer.
A
4
B
2
C
1
D
3

Leave a Reply

Your email address will not be published. Required fields are marked *