πŸ“Š Design and Analysis of Algorithms
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
πŸ’¬ Discuss
βœ… Correct 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.


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

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
535
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
96%
Success Rate