Sail E0 Webinar
Question
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?
Options:
A .  4
B .  2
C .  1
D .  0
Answer: Option A


Even though the first two elements are already sorted, bubble sort needs 4 iterations to sort the given array.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers