{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_851S10_assn05

MIT6_851S10_assn05 - estimate was rough since we...

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

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

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: 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 diﬀerent “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 http://ocw.mit.edu 6.851 Advanced Data Structures Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms ....
View Full Document

{[ snackBarMessage ]}

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
Ask a homework question - tutors are online