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: IE170 Lab #4 Mustafa R. Kln c & Jeff Linderoth IE 170 Lab #4: Heaps and Heapsort Due Date: February 12, 2006. 11AM. 1 Description and Objectives In this lab, we will implement a clever partially ordered data structure called a heap , and use a heap to implement the heapsort algorithm, and we will see if we can beat the Java Collections class for sorting speed. For extra credit, we will compare the heapsort algorithm with the insertion sort algorithm that you already implemented during last two labs. Thus, if your insertion sort doesnt work, you may want to try and fix it. Lab Objectives 1. Understand heaps and the heap property. 2. Understand how to implement heaps and the heapsort algorithm. 3. Understand the effect of data structures on sorting algorithms complexity. 4. Compare heapsort with to Java Collections sorting. 5. Learn how to read data from a file. 2 Heaps and Heapsort A maxheap can be defined as a binary tree with keys assigned to its node satifying following...
View Full
Document
 Spring '07
 Ralphs
 Systems Engineering

Click to edit the document details