Code Fragment: Node



  struct Node {						// a node in the tree
    Object      element;				// the element
    Node*       parent;					// parent
    Node*       left;					// left child
    Node*       right;					// right child
    Node() : element(Object())				// default constructor
      { parent = left = right = NULL; }
    Node* sibling() const {				// get our sibling
      return (this == parent->left ? parent->right : parent->left);
    }
  };
  typedef Node* NodePtr;				// a node pointer