voidpreorder(Node*root) {if (root != NULL) {printf("%d ", root->data); // ① VISIT ROOT firstpreorder(root->left); // ② go LEFTpreorder(root->right); // ③ go RIGHT } // NULL → base case, return immediately}
Preorder = Root → Left → Rightmnemonic"Visit before you descend"