upload algorithm order traversal tree: preorder and postorder