You are viewing a single comment's thread. Return to all comments →
Basic recursive approach in C
void preOrder( struct node *root) { if (root != NULL) { printf("%d ", root->data); preOrder(root->left); preOrder(root->right); } }
Tree: Preorder Traversal
You are viewing a single comment's thread. Return to all comments →
Basic recursive approach in C