[C++] 백준 1991


[C++] 백준 1991

문제 소스코드 #include <iostream> using namespace std; typedef struct tree* TreeNode; typedef struct tree { TreeNode LeftChild; char data; TreeNode RightChild; }; void inorder(TreeNode BT) { if(BT) { inorder(BT->LeftChild); cout << BT->data; inorder(BT->RightChild); } } void preorder(TreeNode BT) { if(BT) { cout << BT->data; preorder(BT->LeftChild); preorder(BT->RightChild); } } void postorder(TreeNode BT) { if(BT) { postorder(BT->LeftChild); postorder(BT->RightChild); cout << BT->data; } } int main()...



원문링크 : [C++] 백준 1991