Chapter 12 Flashcards

1
Q

What procedure is used to root to restore the heap or maintain heap

A

HEAPIFY

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

What is the total time for HEAPIFY

A

O(log n)

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

What will happen if we call HEAPIFY on a leaf

A

It will terminate in Q(1) time

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

What is the total time for BuildHeap

A

Q(n)

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

Does HEAPSORT O(n log n) and also Q(n log n)

A

Yes

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