| 89 | fix(n->p), n->p = n->l = n->r = NULL; |
| 90 | if (free) delete n; } |
| 91 | node* successor(node *n) const { |
| 92 | if (!n) return NULL; |
| 93 | if (n->r) return nth(0, n->r); |
| 94 | node *p = n->p; |
| 95 | while (p && p->r == n) n = p, p = p->p; |
| 96 | return p; } |
| 97 | node* predecessor(node *n) const { |
| 98 | if (!n) return NULL; |
| 99 | if (n->l) return nth(n->l->size-1, n->l); |
nothing calls this directly
no outgoing calls
no test coverage detected