{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw3 - 272 Homework Assignment 3 Fall 2008 Due November 24th...

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

272 – Homework Assignment 3 Fall 2008 Due: November 24th, 5:00 PM Do not discuss the problems with anyone other than the instructor or the TA. 1. In this problem you will generate test cases for a K-ary heap using Korat. A K-ary heap is defined as follows: A K-ary heap is a heap data structure created using a K-ary tree where each node in the tree has at most K children. A K-ary heap can be seen as a K-ary tree with two additional constraints: The shape property : All levels of the tree, except possibly the last one (deepest) are fully filled, and, if the last level of the tree is not filled, the nodes of that level are filled from left to right. The heap property : The data item in each node is greater than or equal to the data items in each of its children according to some comparison predicate which is fixed for the entire data structure. (a) Provide an array implementation of the K-ary heap where K is passed as an argument to the constructor. Write the repOK method for the K-ary heap based on the above description. Use the finitization method to set the range of values in the array and the value of K. An

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

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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern