assign4

# assign4 - University of Waterloo CS240 Fall 2010 Assignment...

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
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, don’t 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

## This note was uploaded on 01/14/2012 for the course CS 246 taught by Professor Wormer during the Winter '08 term at Waterloo.

### Page1 / 4

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

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

View Full Document
Ask a homework question - tutors are online