| 149 | } |
| 150 | |
| 151 | RBTreeNode* getInternal(RBTreeNode* n, int k) |
| 152 | { |
| 153 | if (!n || n == nil) { |
| 154 | return nullptr; |
| 155 | } |
| 156 | if (n->k == k) { |
| 157 | return n; |
| 158 | } |
| 159 | if (k < n->k) { |
| 160 | return getInternal(n->left, k); |
| 161 | } |
| 162 | return getInternal(n->right, k); |
| 163 | } |
| 164 | |
| 165 | int get(int key) |
| 166 | { |
nothing calls this directly
no outgoing calls
no test coverage detected