projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add fgetgrent function
[musl]
/
src
/
search
/
tsearch_avl.c
diff --git
a/src/search/tsearch_avl.c
b/src/search/tsearch_avl.c
index
f5c2cf6
..
b56159b
100644
(file)
--- a/
src/search/tsearch_avl.c
+++ b/
src/search/tsearch_avl.c
@@
-1,6
+1,12
@@
#include <stdlib.h>
#include <search.h>
#include <stdlib.h>
#include <search.h>
+/*
+avl tree implementation using recursive functions
+the height of an n node tree is less than 1.44*log2(n+2)-1
+(so the max recursion depth in case of a tree with 2^32 nodes is 45)
+*/
+
struct node {
const void *key;
struct node *left;
struct node {
const void *key;
struct node *left;