Fix again prefix/postfix (both were wrong order)
This commit is contained in:
4
tree.c
4
tree.c
@@ -72,13 +72,13 @@ void print_node(node, side, depth, details)
|
||||
} else {
|
||||
printf("%d ", node->val);
|
||||
}
|
||||
print_node(node->right, TREE_RIGHT, depth+1, details);
|
||||
print_node(node->left, TREE_LEFT, depth+1, details);
|
||||
print_node(node->right, TREE_RIGHT, depth+1, details);
|
||||
break;
|
||||
case 0: /* postfix */
|
||||
case 5: /* dc suitable */
|
||||
print_node(node->right, TREE_RIGHT, depth+1, details);
|
||||
print_node(node->left, TREE_LEFT, depth+1, details);
|
||||
print_node(node->right, TREE_RIGHT, depth+1, details);
|
||||
if (node->type==TREE_NODE) {
|
||||
printf("%c ", node->op);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user