Question:

Published on: 29 May, 2024

**Draw a minimum heap tree from the below list : **

** 12, 11, 7, 3, 10, – 5, 0, 9, 2 **

**Now do the heap sort operation over the heap tree which you have formed. Write the insertion sort algorithm.**

Answer:

**Minimum Heap Tree**

**Insertion Sort Algorithm**

for( i=1; i<n;i++) { temp=a[i]; for(j=i-1;j>=0;j--) { if(temp<a[j]) a[j+1]=a[j]; else break; } a[j+1]=temp; }

Subjects

Trending

Define the ADT for stack. Show the implementation of the stack data structure using linked list.

View : 731

29 May, 2024

Find the postfix notation of

( a + b * x) / ( a ! – d ) s – c * y ( show all steps ).

View : 747

29 May, 2024

Random questions

**Write a C program to print all prime no.(1-100).**

29 May, 2024

**Write a C program to convert any name in short name.**

29 May, 2024

**Describe Cost of Software Quality**

29 May, 2024