Home | History | Annotate | Download | only in full_bisect_test
      1 #include <stdio.h>
      2 #include <stdlib.h>
      3 #include "bin-trees.h"
      4 
      5 static void
      6 real_preorder (tree_ptr root)
      7 {
      8   if (root == NULL)
      9     return;
     10 
     11   printf ("%d ", root->data);
     12   real_preorder (root->left);
     13   real_preorder (root->right);
     14 }
     15 
     16 
     17 void
     18 pre_order_traverse (tree_ptr root)
     19 {
     20   printf ("pre-order traversal, with recursion: \n");
     21   real_preorder (root) ;
     22   printf ("\n");
     23 }
     24