Utilice las siguientes estructuras y tipos de datos para árboles binarios. No olvide incluirlos en su archivo de encabezado.
/**
* struct binary_tree_s - Binary tree node
*
* @n: Integer stored in the node
* @parent: Pointer to the parent node
* @left: Pointer to the left child node
* @right: Pointer to the right child node
*/
struct binary_tree_s
{
int n;
struct binary_tree_s *parent;
struct binary_tree_s *left;
struct binary_tree_s *right;
};
typedef struct binary_tree_s binary_tree_t;
typedef struct binary_tree_s bst_t;
typedef struct binary_tree_s avl_t;
typedef struct binary_tree_s heap_t;
Write a function that creates a binary tree node
Write a function that inserts a node as the left-child of another node
Write a function that inserts a node as the right-child of another node
Write a function that deletes an entire binary tree
Write a function that checks if a node is a leaf
Write a function that checks if a given node is a root
Write a function that goes through a binary tree using pre-order traversal
Write a function that goes through a binary tree using in-order traversal
Write a function that goes through a binary tree using post-order traversal
Write a function that measures the height of a binary tree
Write a function that measures the depth of a node in a binary tree
Write a function that measures the size of a binary tree
Write a function that counts the leaves in a binary tree
Write a function that counts the nodes with at least 1 child in a binary tree
Write a function that measures the balance factor of a binary tree
Write a function that checks if a binary tree is full
Write a function that checks if a binary tree is perfect
Write a function that finds the sibling of a node
Write a function that finds the uncle of a node