First page Back Continue Last page Graphics
Instead we represent red “links” by coloring the node the link references red.
This can be done by simply
adding a boolean to the BST
Node class:
- class Node
{
Object stored;
Node left, right;
boolean coloredRed;
}