diff options
author | Christian C <cc@localhost> | 2025-03-23 14:59:45 -0700 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-23 14:59:45 -0700 |
commit | 981e8bfd12f79cb469bb54a915230eda6dafab41 (patch) | |
tree | 6cf6390e16caa9f1fa74ed51f51ee88f2179fe10 /lib/algo | |
parent | 25a026af522f5f00afc98c139b4d0de41551ea9c (diff) |
Comparator Type
Diffstat (limited to 'lib/algo')
-rw-r--r-- | lib/algo/avl_tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/algo/avl_tree.c b/lib/algo/avl_tree.c index 3b5c8aa..9ac5d47 100644 --- a/lib/algo/avl_tree.c +++ b/lib/algo/avl_tree.c @@ -57,7 +57,7 @@ struct AVLNode* left_rotate(struct AVLNode* parent) } // Create AVL node -struct AVLNode* create_avl_node(void* data, bool_t (*compare)(void*, void*)) +struct AVLNode* create_avl_node(void* data, AvlComparator compare) { struct AVLNode* node = (struct AVLNode*)malloc(sizeof(struct AVLNode)); if (node == NULL) { @@ -72,7 +72,7 @@ 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*)) +struct Result avl_insert(struct AVLNode* node, void* data, AvlComparator compare) { struct Result result; // 1. Standard BST insertion |