Heaps Flashcards

1
Q

Max heap

A

The root must be the maximum among all of its children

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

Min heap

A

The root must be the minimum among all of its children.

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

Heaps: inserting

A
  1. Insert key X at the bottom of the heap
  2. Heapify
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Heaps: deletion

A
  1. Remove key from root
  2. Replace with the last key of the heap
  3. Heapify
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Heapify Code

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

Heapsort code

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