Consider the array A[]= {5,4,9,1,3} apply the insertion sort to sort the array . Consider the cost associated with each sort is 25 rupees, what is the total cost of the insertion sort when element 1 reaches the first position of the array?
Answers
Answered by
4
Answer:
The answer will be 50 Rs
Explanation:
As given the array is consisted of five elements.
Insertion Sort is applied on this array. The cost for each iteration is given.
According to the algorithm of insertion sort it can be said that to reach to the 1st position the element 1 will need of two iteration
Therefore the cost will 50 Rs
Similar questions