This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Heaps Heap Sort IE170: Algorithms in Systems Engineering: Lecture 9 Jeff Linderoth Department of Industrial and Systems Engineering Lehigh University February 2, 2007 Jeff Linderoth IE170:Lecture 9 Heaps Heap Sort Taking Stock Last Time Binary Search Trees Java Collections Interfaces: Maps Heap != Binary Search Tree This Time Heaps Heap Sort Jeff Linderoth IE170:Lecture 9 Heaps Heap Sort Definitions Heap Operations Heaps A heap is a balanced binary tree with additional structure that allows it to function efficiently as a priority queue. There are two types of heaps: max and min . In lecture, I’ll stick to max Priority Queue (Max) insert( x ) maximum() x = extractmax() increasekey( x , k ) Jeff Linderoth IE170:Lecture 9 Heaps Heap Sort Definitions Heap Operations Heaps Heaps are a bit like binary search trees, however, they enforce a different property Heap Property: Children are Horrible!...
View
Full
Document
This note was uploaded on 08/06/2008 for the course IE 170 taught by Professor Ralphs during the Spring '07 term at Lehigh University .
 Spring '07
 Ralphs
 Systems Engineering

Click to edit the document details