You can type any text information in this paragraph block. All the Markdown (md) decorators can be use inside here in order to markup your text, they will be keep as-is while being parsed.
int binary_tree_is_root(const binary_tree_t *node)
size_t binary_tree_depth(const binary_tree_t *node)
binary_tree_depth - measures the depth of a node
@node
pointer to the node to measure the depth of
- type size_t or 0 if NULL
void binary_tree_delete(binary_tree_t *tree)
binary_tree_delete - deletes full binary tree
@tree
root to tree
size_t binary_tree_nodes(const binary_tree_t *tree)
binary_tree_nodes - checks how many nodes have 1 or more childs in a tree
@tree
root of the tree
- count of how many nodes have 1 or more childs
static int print_t(const binary_tree_t *tree, int offset, int depth, char **s)
print_t - Stores recursively each level in an array of strings
@tree
Pointer to the node to print@offset
Offset to print@depth
Depth of the node@s
Buffer
- length of printed tree after process
static size_t _height(const binary_tree_t *tree)
_height - Measures the height of a binary tree
@tree
Pointer to the node to measures the height
- The height of the tree starting at @node
void binary_tree_print(const binary_tree_t *tree)
binary_tree_print - Prints a binary tree
@tree
Pointer to the root node of the tree to print
size_t binary_tree_leaves(const binary_tree_t *tree)
binary_tree_t *binary_tree_insert_right(binary_tree_t *parent, int value)
binary_tree_insert_right - inserts node as right-child of a node
@parent
pointer to the node to insert the right-child in@value
value to store in the new node
- pointer to the created node, or NULL on failure
size_t binary_tree_height(const binary_tree_t *tree)
int tree_height(const binary_tree_t *tree)
tree_height - gets height of a tree
@tree
root of the tree
- max height of tree
int binary_tree_balance(const binary_tree_t *tree)
binary_tree_balance - finds balance factor of tree (height left - height right)
@tree
root of tree
- balance of tree from root
size_t binary_tree_size(const binary_tree_t *tree)
binary_tree_t *binary_tree_insert_left(binary_tree_t *parent, int value)
binary_tree_insert_left - inserts node as left-child of a node parent: pointer to the node to insert the left-child in value: value to store in the new node
- pointer to the created node, or NULL on failure
binary_tree_t *binary_tree_node(binary_tree_t *parent, int value)
binary_tree_node - creates a binary tree node
@parent
parent of the created binary tree@value
value of the node
int binary_tree_is_leaf(const binary_tree_t *node)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
void print_num(int n)
print_num - Prints a number
@n
Number to be printed
int main(void)
main - Entry point
- Always 0 (Success)
void print_num(int n)
print_num - Prints a number
@n
Number to be printed
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)
void print_num(int n)
print_num - Prints a number
@n
Number to be printed
int main(void)
main - Entry point
- Always 0 (Success)
int main(void)
main - Entry point
- Always 0 (Success)