comparison: ucx/avl.c
ucx/avl.c
- changeset 199
- e25dc68336ec
- parent 197
- a82f3456b76d
- child 202
- 4c84dd2408d7
equal
deleted
inserted
replaced
212 } else { |
212 } else { |
213 return NULL; |
213 return NULL; |
214 } |
214 } |
215 } |
215 } |
216 |
216 |
|
217 static size_t ucx_avl_countn(UcxAVLNode *node) { |
|
218 if (node) { |
|
219 return 1 + ucx_avl_countn(node->left) + ucx_avl_countn(node->right); |
|
220 } else { |
|
221 return 0; |
|
222 } |
|
223 } |
|
224 |
|
225 size_t ucx_avl_count(UcxAVLTree *tree) { |
|
226 return ucx_avl_countn(tree->root); |
|
227 } |