1.

Consider the following list of the integer:19, 23, 40, 32, 91, 25, 100, 36 Sort this list in increasing order using insertion sort and determine the number of passes, comparisons, and swaps. Here a pass means iteration of main loop. We may assume that we start checking from first element which is 19 here.Note – This question is multiple select questions (MSQ).(A) There will be total 8 passes for all 8 integers(B) Number of comparisons and Swaps for each pass for given sequences to sort in increasing order are 14 and 7 respectively(C) Number of comparisons for each pass for given sequences to sort in increasing order is 7(D) Number of swaps for each pass for given sequences to sort in increasing order is 14

Answer» None


Discussion

No Comment Found

Related InterviewSolutions