Computer Science, asked by srividyajampala, 5 hours ago

find out the array representation of the given max heap,if thr rootbis deleted from it 30,26,22,18

Answers

Answered by shrikarporje02
0

Answer:123456

Explanation:ses

Answered by assaadhanaasri08
0

Answer:

A

Explanation:32, 15, 20, 30, 12, 25, 16  

After insertion of 32, 15 and 20

         32

       /    \

     15      20

 

After insertion of 30

         32

       /    \

     15      20

    /

   30

Max Heap property is violated, so 30 is swapped with 15

         32

       /    \

     30      20

    /

   15

After insertion of 12

         32

       /    \

     30      20

    /  \

   15  12

After insertion of 25

         32

       /    \

     30      20

    /  \     /

   15  12   25

Max Heap property is violated, so 25 is swapped with 20

         32

       /    \

     30      25

    /  \     /

   15  12   20

After insertion of 16

         32

       /    \

     30      25

    /  \     /  \

   15  12   20  16

Similar questions