InterviewSolution
Saved Bookmarks
| 1. |
The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable)The number of iterations in selection sort and bubble sort respectively are __________(a) 5 and 4(b) 1 and 4(c) 0 and 4(d) 4 and 1The question was posed to me in a job interview.Query is from Selection Sort in chapter Sorting of Data Structures & Algorithms II |
|
Answer» Correct option is (d) 4 and 1 |
|