1 #include <stdlib.h>
2 #include <stdio.h>
3 #include "bin-trees.h"
4
5 int integers[] = {35, 28, 20, 30, 25, 23, 26, 60, 70, 65, 64, 68 };
6
7 char pre_order[] = { '/', '-', '+', '*', 'a', '^', 'x', '2', '&', 'b', 'y',
8 'c', '3' };
9 char in_order[] = { 'a', '*', 'x', '^', '2', '+', 'b', '&', 'y', '-', 'c',
10 '/', '3' };
11
12 int
main(int argc,char ** argv)13 main (int argc, char ** argv)
14 {
15 int intlist_size = 12;
16 int i;
17 tree_ptr root = NULL;
18 for (i = 0; i < intlist_size; ++i)
19 {
20 search_tree_insert (&root, integers[i]);
21 }
22 pre_order_traverse (root);
23 printf ("\n");
24 pre_order_traverse_no_recurse (root);
25 printf ("\n");
26 in_order_traverse (root);
27 printf ("\n");
28 in_order_traverse_no_recurse (root);
29 return 0;
30 }
31