/
graal_avl.h
28 lines (19 loc) · 1017 Bytes
/
graal_avl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/************************************************************************
* A big part of this code come from http://www.eternallyconfuzzled.com. *
* Thanks to the author of this website for its sharing. *
* *
* Copyright © 2016 Matthieu Dien <matthieu.dien@lip6.fr> *
* This work is free. You can redistribute it and/or modify it under the *
* terms of the Do What The Fuck You Want To Public License, Version 2, *
* as published by Sam Hocevar. See the COPYING file for more details. *
************************************************************************/
#ifndef __GRAAL_AVL__
#define __GRAAL_AVL__
typedef struct _avl_tree* avl_tree;
avl_tree avl_make_empty_tree(void);
void avl_erase_tree(avl_tree t);
void* avl_search(avl_tree tree, void* data);
avl_tree avl_insert(avl_tree tree, void* data);
avl_tree avl_remove(avl_tree tree, void* data);
void avl_traverse_and_print(avl_tree tree);
#endif