lab4 - IE170 Lab#4 Mustafa R Kılın¸ c& Jeff Linderoth...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IE170 Lab #4 Mustafa R. Kılın¸ 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 doesn’t 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 algorithm’s complexity. 4. Compare heapsort with to Java Collections sorting. 5. Learn how to read data from a file. 2 Heaps and Heapsort A max-heap can be defined as a binary tree with keys assigned to its node satifying following...
View Full Document

{[ snackBarMessage ]}

Page1 / 3

lab4 - IE170 Lab#4 Mustafa R Kılın¸ c& Jeff Linderoth...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online