MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / getInternal

Method getInternal

templates/red-black-tree.cpp:132–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected