CSE 1729 Lecture Notes - Lecture 19: Car And Cdr, Priority Queue, Binary Tree
CSE 1729 verified notes
19/30View all
Document Summary
Build a heap 2. repeatedly extract the minimum element. Removing the minimum element from a heap: 1 view, let min(h) denote the minimum element of heap h, find minimum value: findmin(h). Return the value of the root: remove minimum value: removemin(h), remove the top element. 2 heaps result: h1, h2; problem: how do you combine them into a single heap: suppose min(h1)