Advertisements
Advertisements
प्रश्न
______ is an algorithm that requires minimum number of swaps.
पर्याय
Insertion sort
Quick sort
Heap sort
Selection sort
MCQ
रिकाम्या जागा भरा
उत्तर
Selection sort is an algorithm that requires minimum number of swaps.
Explanation:
Selection sort is an in place method that requires the fewest swaps since we constantly chose the smallest element and place it in the proper location, therefore the total number of swaps is n-1 in the worst case. As a result, selection sort performs the fewest swaps when compared to other algorithms.
shaalaa.com
Selection Sort
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?