CSE 373 Lecture 7: CSE 373 Lecture 7

51 views3 pages
CSE 373 Lecture 7
- Implementing removeMin()
o Replace removed root w most recently added node:
o Rebalance by percolating down
Recursively swap parent w smallest child
- Implementing insert() always go down from unfilled level, + insert furthest left
o Rebalance by percolating up
Recursively swap child w parent
Friday, May 4, 2018
Implementing Heaps with an array
- Fill in level order, left to right
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents