Professional Documents
Culture Documents
Who am I?
Objective of today’s sharing
What is Binary Heap used for?
What is a Binary
Heap?
100
55 36
43 33 25 1
2 7
Rules (Constraints)
of Binary Heap
100
55 36
43 33 25 1
Shape property
Heap property
2 7
Rules (Constraints)
of Binary Heap
100
55 36
55 36
55 36
1.
43 33 25 1
2 7
Operations of Binary
Heap (Insert) 100
55 36
43 33
45
Operations of Binary
Heap (Insert) 100
55 36
43 33 45
Operations of Binary
Heap (Insert) 100
55 45
43 33 36
Operations of Binary
Heap (Insert) 100
55 45
43 33 36
Operations of Binary
Heap (Extract) 100
55 45
43 33 36
Operations of Binary
Heap (Extract) 36
55 45
43 33
Operations of Binary
Heap (Extract) 36
55 45
43 33
Operations of Binary
Heap (Extract) 55
36 45
43 33
Operations of Binary
Heap (Extract) 55
43 45
36 33
Operations of Binary
Heap (Extract) 55
43 45
36 33
Recap: Binary Heap
Writing Tests!
Writing Tests!
100 55 36 43 33 43 33
Let’s write some tests for
real!
Test Data
100
55 36
43 33
Insert(45)
100
55 45
43 33 36
Test Data
100
55 36
43 33
Extract
55
43 36
33
Solution
Feedbacks are
welcome!
Title
100
19 36
17 3 25 1
2 7
100
55 36
43 33
100
19 36
3 25 1