Consider an array of size nine with the numbers in the following order: 40, 60, 20, 80, 70, 90, 30, 10, 50. (a) Create the heap using the algorithm described in class. Show the heap as a tree. Show the heap as an array. Exactly how many comparisons did heap creation use

Respuesta :

Answer:

See attached picture for heap creation steps.

10 comparisons were used.

Explanation:

See attached pictures.

Ver imagen abdullahfarooqi
Ver imagen abdullahfarooqi