This flashcard is just one of a free flashcard set. See all flashcards!
4
Preorder/Postorder/Inorder
private void print_order(TreeNode root){
if (root == null){
return;
}
print_postOrder(root.left);
print_postOrder(root.right);
print(root);
print(root);
print_preOrder(root.left);
print_preOrder(root.right);
print_inOrder(root.left);
print(root);
print_inOrder(root.right);
}
if (root == null){
return;
}
print_postOrder(root.left);
print_postOrder(root.right);
print(root);
print(root);
print_preOrder(root.left);
print_preOrder(root.right);
print_inOrder(root.left);
print(root);
print_inOrder(root.right);
}
Flashcard info:
Author: hristiana86
Main topic: Informatik
School / Univ.: HS
City: Mannheim
Published: 14.06.2010