Serialization example, Binary tree traversals