34#define Type BINARY_NODE_TYPE
37#define AVLT_EMPTY (AVLTree*) 0
struct BinaryNode AVLTree
This module define a Abstract Data Type for the structure Binary Search Tree.
Definition avl.h:32
AVLTree * avl_create(void)
Creates an empty AVL tree.
int avl_two_children(AVLTree *t)
Counts the number of nodes in an AVL tree that have two children.
int avl_nodes_equal_height(AVLTree *t)
Counts the number of nodes in an AVL tree that have equal branch heights.
AVLTree * avl_remove(AVLTree *t, Type c)
Removes a value from an AVL tree.
void avl_infix(AVLTree *t)
Prints the elements of an AVL tree in in-order traversal.
int avl_nodes(AVLTree *t)
Counts the number of nodes in an AVL tree.
void avl_free(AVLTree *t)
Frees the memory allocated for an AVL tree.
int avl_empty(AVLTree *t)
Checks if an AVL tree is empty.
int avl_leafs_primes(AVLTree *t)
Counts the number of leaf nodes in an AVL tree that are prime numbers.
int avl_equals(AVLTree *t1, AVLTree *t2)
Compares two AVL trees for equality.
int avl_height(AVLTree *t)
Returns the height of an AVL tree.
int avl_exists(AVLTree *t, Type c)
Checks if a value exists in an AVL tree.
AVLTree * avl_insert(AVLTree *t, Type c)
Inserts a value into an AVL tree.
void avl_posfix(AVLTree *t)
Prints the elements of an AVL tree in post-order traversal.
void avl_print(AVLTree *t)
Prints the elements of an AVL tree in in-order traversal.
AVLTree * avl_search(AVLTree *t, Type c)
Searches for a value in an AVL tree.
AVLTree * avl_create_node(Type value)
Creates a new AVL tree node.
void avl_prefix(AVLTree *t)
Prints the elements of an AVL tree in pre-order traversal.
#define Type
Definition sort.h:17
A node in a binary tree.
Definition binary-tree.h:29
BINARY_NODE_TYPE value
Definition binary-tree.h:30