| 130 | } |
| 131 | |
| 132 | RBTreeNode* getInternal(RBTreeNode* n, int k) |
| 133 | { |
| 134 | if (!n || n == nil) { |
| 135 | return nullptr; |
| 136 | } |
| 137 | if (n->k == k) { |
| 138 | return n; |
| 139 | } |
| 140 | if (k < n->k) { |
| 141 | return getInternal(n->left, k); |
| 142 | } |
| 143 | return getInternal(n->right, k); |
| 144 | } |
| 145 | |
| 146 | int get(int key) |
| 147 | { |
nothing calls this directly
no outgoing calls
no test coverage detected