The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and selection sort respectively are __________
(a) 5 and 4
(b) 4 and 5
(c) 2 and 4
(d) 2 and 5
This question was posed to me at a job interview.
Origin of the question is Selection Sort in chapter Sorting of Data Structures & Algorithms II