asg10 - COP 3530 Assignment 10 Due: 6th Nov 2009 1....

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

View Full Document Right Arrow Icon
COP 3530 Assignment 10 Due: 6 th Nov 2009 1. Height-biased Leftist trees. Consider the following height-biased max leftist tree. Show the modified tree under each of the following operations. (Note: The two operations (a) and (b) are independent. Each of them starts from the given tree.) 14 / \ 12 10 / \ / \ 8 4 6 9 / / 2 5 a. Perform a put (7). Label each node of the resulting tree with its s -value ( shortest ( x )). b. Perform a RemoveMax () operation on the given tree above. Show each step. 2 . Tournament trees. A k-tournament is tree is a complete binary tree in which the winner of each match moves up to occupy also the parent position. In a pointer-based implementation, we have for each cell, pointers left [.] and right [.] to left and right children, and a value [.]. Design an efficient algorithm for merging two k-tournament trees into a (k+1)-tournament tree. Justify your algorithm’s time complexity. 3.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2010 for the course COP 3530 taught by Professor Davis during the Fall '08 term at University of Florida.

Page1 / 3

asg10 - COP 3530 Assignment 10 Due: 6th Nov 2009 1....

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