EXAM second set Flashcards

1
Q

Given an array A[0]….A[n-1] of n integers, give the pseudocode to turn this array into a max heap. (You may not use an extra array.) Then justify that turning an array into a heap by your algorithm, takes linear time in the worst case. What is be the best-case running time of your algorithm? Justify your answers

A

HW 4 Problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly