imprima una lista de todos los vértices de un árbol que tienen un solo hijo
void printSingleChild(TreeNode* root){ if(root == NULL){ return; } if(root->left == NULL and root->right != NULL){ cout << root->data << " "; } if(root->right == NULL and root->left != NULL){ cout << root->data << " "; } printSingleChild(root->left); printSingleChild(root->right); }