An inorder traversal for a subtree rooted at node p. Performs an // inorder traversal on the left subtree, then calls f for the data item // at p, then performs an inorder traversal on the right subtree. template <typename U> void inorder (node* p, U f) const { // TODO: Complete this function. } // A preorder traversal for a subtree rooted at node p. Calls f for the // data item at p with the given depth, then performs a preorder // traversal on the left and right subtrees passing the depth plus 1. template <typename U> void preorder (node* p, U f, int depth) const { // TODO: Complete this function. }.