Preorder traversals of binary trees