| 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); |
| 100 | node *p = n->p; |
| 101 | while (p && p->l == n) n = p, p = p->p; |
| 102 | return p; } |
| 103 | node* nth(int n, node *cur = NULL) const { |
| 104 | if (!cur) cur = root; |
| 105 | while (cur) { |
nothing calls this directly
no outgoing calls
no test coverage detected