McqMate

Q. |
## What is the number of swaps required to sort the array arr={5,3,2,4,1} using recursive selection sort? |

A. | 0 |

B. | 1 |

C. | 2 |

D. | 3 |

Answer» C. 2 | |

Explanation: the first swap takes place between 1 and 5. the second swap takes place between 3 and 2 which sorts our array. |

4.7k

0

Do you find this helpful?

43

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Recursive selection sort is a comparison based sort.
- What will be the recurrence relation of the code of recursive selection sort?
- What will be the best case time complexity of recursive selection sort?
- What is the average case time complexity of recursive selection sort?
- How many recursive calls are there in Recursive matrix multiplication by Strassen’s Method?
- For a given array, there can be multiple ways to reach the end of the array using minimum number of jumps.
- For any array, given that at most one element is non-zero, it is ALWAYS possible to reach the end of the array using minimum jumps.
- Given an array, check if the array can be divided into two subsets such that the sum of elements of the two subsets is equal. This is the balanced partition problem. Which of the following methods can be used to solve the balanced partition problem?
- Which of the following recursive formula can be used to find the factorial of a number?
- What is the advantage of iterative code for finding power of number over recursive code?