Advertisements
Advertisements
प्रश्न
In insertion sort average number of comparisons required to place the 7th element into the correct position is:
पर्याय
2
7
4
9
MCQ
उत्तर
4
Explanation:
(k + 1)/2 is the average number of comparisons necessary to place the 7th element in the correct position. Here, k = 7. As a result, the total number of comparisons is (7 + 1)/2 = 8/2 = 4.
shaalaa.com
Insertion Sort
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?