Rewrite the tree serialization and deserialization methods. Add applications of array and linked list.