projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d197d64
)
search: add comments to tsearch_avl.c
author
nsz
<nsz@port70.net>
Sat, 12 May 2012 23:50:53 +0000
(
01:50
+0200)
committer
nsz
<nsz@port70.net>
Sat, 12 May 2012 23:50:53 +0000
(
01:50
+0200)
src/search/tsearch_avl.c
patch
|
blob
|
history
diff --git
a/src/search/tsearch_avl.c
b/src/search/tsearch_avl.c
index f5c2cf61da99decc3b091ddcbc0bef025ada1116..b56159b9baf05041ba3958cb8bf949602574190f 100644
(file)
--- a/
src/search/tsearch_avl.c
+++ b/
src/search/tsearch_avl.c
@@
-1,6
+1,12
@@
#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;