알고리즘/트리 썸네일형 리스트형 [B1991] - 트리 순회 https://www.acmicpc.net/problem/1991 postorder inorder preorder에 따라 출력하면 된다.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950#include #include using namespace std;struct tree { int left; int right;};tree a[52];void postorder(int x) { if (x == -1) return; postorder(a[x].left); postorder(a[x].right); cout > right; int x = node - 'A'; if(left=='.') a[x].lef.. 더보기 이전 1 다음