{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exer5 - CMPT 307 Data Structures and Algorithms Exercises...

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

View Full Document Right Arrow Icon
CMPT 307 — Data Structures and Algorithms Exercises on Red-Black Trees. Due: Thursday, November 5th (at the beginning of the class) Reminder: the work you submit must be your own. Any collaboration and consulting outside resources must be explicitly mentioned on your submission. 1. Show that any arbitrary n -node binary search tree can be transformed into any other arbitrary n -node binary search tree using O ( n ) rotations. 2. Suppose that a node x is inserted into a red-black tree with RB-Insert and then immediately deleted with RB-Delete. Is the resulting RB-tree the same as the initial RB-tree? Justify your answer. 3. During the course of an algorithm, we sometimes find that we need to maintain past versions of a dynamic set as it is updated. Such a set is called persistent . One way to implement a persistent set is to copy the entire set whenever it is modified, but this approach can slow down a program and also consumes much space. Sometimes,we can do better.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern