diff options
Diffstat (limited to 'include/lib/algo/avl_tree.h')
-rw-r--r-- | include/lib/algo/avl_tree.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/lib/algo/avl_tree.h b/include/lib/algo/avl_tree.h index 4bfc0f7..f77ce5b 100644 --- a/include/lib/algo/avl_tree.h +++ b/include/lib/algo/avl_tree.h @@ -29,6 +29,12 @@ struct AVLNode* right_rotate(struct AVLNode* parent); // Rotate an AVL node left struct AVLNode* left_rotate(struct AVLNode* parent); +// Create AVL node +struct AVLNode* create_avl_node(void* data, bool_t (*compare)(void*, void*)); + +// Insert data into AVL tree +struct Result avl_insert(struct AVLNode* node, void* data, bool_t (*compare)(void*, void*)); + // In-order traversal print pointer void print_in_order(struct AVLNode* root); |