assign4 - University of Waterloo CS240, Fall 2010...

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 DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: University of Waterloo CS240, Fall 2010 Assignment 4 Due Date: Wednesday, November 24, at 5:00pm Please read http://www.student.cs.uwaterloo.ca/ ~ cs240/f10/guidelines.pdf for guidelines on submission. In particular, dont forget to make a cover page ( https://www. student.cs.uwaterloo.ca/ ~ isg/makeCover?course=cs240 ) and attach it to the front of any written assignment. Problems 1 3 and 4 (b) are written problems; submit your solutions on paper to the assignment boxes in MC. Problem 4 (a) is a programming problem; submit your solution electronically as a file named kdpartition.c . There are 50 marks available. Problem 1 AVL Tree Deletion [4+4=8 marks] Consider the following AVL tree. 78 / \ 62 86 / \ \ 57 65 90 / \ 55 66 (a) Delete 90 and rebalance. Indicate which nodes correspond to z , y and x from the deletion recipe explained in class. Show the final tree. (b) Show the resulting tree if you incorrectly choose x = 65 in the deletion recipe. Problem 2 Extendible Hashing [6+6=12 marks] Suppose we have an extendible hashing scheme with block size S = 3 and parameter L = 5. The universe of keys is non-negative integers with at most 8 bits, U = { , 1 ,..., 255 } , and the hash function is h ( k ) = b k/ 16 c + ( k mod 16) ....
View Full Document

Page1 / 4

assign4 - University of Waterloo CS240, Fall 2010...

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