-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path15-main.c
More file actions
30 lines (27 loc) · 818 Bytes
/
15-main.c
File metadata and controls
30 lines (27 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdlib.h>
#include <stdio.h>
#include "binary_trees.h"
/**
* main - Entry point
*
* Return: Always 0 (Success)
*/
int main(void)
{
binary_tree_t *root;
int full;
root = binary_tree_node(NULL, 98);
root->left = binary_tree_node(root, 12);
root->right = binary_tree_node(root, 402);
binary_tree_insert_right(root->left, 54);
binary_tree_insert_right(root, 128);
root->left->left = binary_tree_node(root->left, 10);
binary_tree_print(root);
full = binary_tree_is_full(root);
printf("Is %d full: %d\n", root->n, full);
full = binary_tree_is_full(root->left);
printf("Is %d full: %d\n", root->left->n, full);
full = binary_tree_is_full(root->right);
printf("Is %d full: %d\n", root->right->n, full);
return (0);
}