| [ Home ] | [ Slides ] | [ Examples ] | [ Exercises ] | [ Resources ] |
This work is due before Monday June 12 2006 at 18:00 in my mail box. (In the lobby of the Rolex building). This work has to be delivered on paper (no e-mail).
This homework will be done by groups of two. If a class contains an odd number of students, one person will work alone. We want to produce a Java "Red Black Tree Dictionary". This data-structure
is explained in the slides that you received in course. You can also download
it from here.
Red-Black Trees
Handshout (4 pages on 1 page)
Slides
This data structure is a binary search tree with a heigh bounded by
2.log(n-1). You can experience more about the Red-Black Trees in the pages 170
to 184 of the book Algorithm Design of Goodrich and Tamassia (also known as
the book).
Dictionary.java: A
dictionary interface (do not forget to add a comparator in the constructor of
your red-black dictionary).Entry.java The
interface being returned by the dictionaryRedBlackNode.java
The nodes used to build a tree.Comparator.java The
interface to be implemented by classes used to compare elements.Dictionary using the
RedBlackNodes. Do not forget to also use a
ComparatorRedBlackNode as
instance variable of your Dictionary. (this means that you will
not have to implement a tree or a binary tree, just use directly the
nodes).