parent.rightnext.leftnext.lefttree.righttree Class Cell { Cell *lefttree, *righttree, *leftnext, *rightnext, *parent; TreeObject *object; Cell (TreeObject *obj, Cell *lnx, Cell *prt) { parent = prt; leftnext = lnx; object = obj; rightnext = righttree = lefttree = NULL; } };
.tail NULL.head
14.tail NULL.head NULL TreeObject *t = new IntegerObject(14);... if (head == NULL) { head = tail = new Cell(t, NULL, NULL); }
14.tail.head
14.tail.head 13 TreeObject *t = new IntegerObject(13);... if (head == NULL) { head = tail = new Cell(t, NULL, NULL); } else if (tail->lefttree == NULL) { if (tail->leftnext == NULL) { tail->lefttree = new Cell(...
14.tail.head 13 TreeObject *t = new IntegerObject(13);... if (head == NULL) { head = tail = new Cell(t, NULL, NULL); } else if (tail->lefttree == NULL) { if (tail->leftnext == NULL) { tail->lefttree = new Cell(t, tail, tail);...
14.tail.head 13 TreeObject *t = new IntegerObject(13);... if (head == NULL) { head = tail = new Cell(t, NULL, NULL); } else if (tail->lefttree == NULL) { if (tail->leftnext == NULL) { tail->lefttree = new Cell(t, tail, tail); tail->rightnext = tail->lefttree; }
head.tail.last Cell *last = tail->lefttree;
head.tail 13.last tail->righttree = new Cell(t,...
head.tail 13.last.tail->righttree = new Cell(t, last, tail);
head.tail 13.last last->rightnext = tail->righttree;
head.tail 13.last.tail = tail->rightnext;
head.tail 13
head.tail 13.h.h.h = tail->leftnext->righttree;
head.tail 23.h TreeObject *obj = h->object; h->object = h->parent->object; h->parent->object = obj;
head.tail 23.h.h H = h->parent;
head.tail 23.h
head.tail 23.h
head.tail 23.last.last = tail->leftnext->righttree;
head.tail last.tail->lefttree = new Cell(t,...
head.tail last.tail->lefttree = new Cell(t, last, tail);
head.tail last.last->rightnext = tail->lefttree;
head.tail 23 25
head.tail h
head.tail h
head.tail h
head.tail h
head.tail h
head.tail 23 35