MIT6_851S10_assn05 - estimate was rough, since we...

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

View Full Document Right Arrow Icon
6.851 Advanced Data Structures (Spring’10) Prof. Erik Demaine Dr. Andr´ e Schulz TA: Aleksandar Zlateski Problem 5 Due: Thursday, Mar. 11 Be sure to read the instructions on the assignments section of the class web page. Cartesian trees in linear time. Show that a Cartesian tree for an array A [1 ,...,n ] can be computed in O ( n ) time. Hint: One way to do this is adding the elements of A according to their order in A one after another. Space requirements for integer data structures. As usual, u denotes the size of the universe. We assume that u is a power of 2. 1. Show that a van Emde Boas tree needs O ( u ) space. 2. How many entries are stored in the hash table of an x-fast tree in the worst case after adding n elements? In the lecture we gave a brief argument for n log u . However, this
Background image of page 1

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

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

Unformatted text preview: estimate was rough, since we overcounted the entries in the hash table. In particular, an entry in the hash table might be a preFx of dierent keys, and we assume that every preFx is only stored once. Give a sharper bound for the number of elements stored in the hash table in terms of u and n . 1 MIT OpenCourseWare 6.851 Advanced Data Structures Spring 2010 For information about citing these materials or our Terms of Use, visit: ....
View Full Document

This note was uploaded on 03/31/2011 for the course EECS 6.851 taught by Professor Erikdemaine during the Spring '10 term at MIT.

Page1 / 2

MIT6_851S10_assn05 - estimate was rough, since we...

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