+1 (218) 451-4151
glass
pen
clip
papers
heaphones

Implement the tree ADT using the binary tree representation described in Exercise C-8.52. You may…

Implement the tree ADT using the binary tree representation described in Exercise C-8.52. You may…

Implement the tree ADT using the binary tree representation described in Exercise C-8.52. You may adapt the LinkedBinaryTree implementation.Exercise C-8.52We can define a binary tree representation T′ for an ordered general tree T as follows (see Figure 8.21):• For each position p of T, there is an associated position p′ of T′ . • If p is a leaf of T, then p′ in T′ does not have a left child; otherwise the left child of p′ is q′ , where q is the first child of p in T. • If p has a sibling q ordered immediately after it in T, then q′ is the right child of p′ in T; otherwise p′ does not have a right child.Given such a representation T′ of a general ordered tree T, answer each of the following questions:a. Is a preorder traversal of T′ equivalent to a preorder traversal of T?b. Is a postorder traversal of T′ equivalent to a postorder traversal of T?c. Is an inorder traversal of T′ equivalent to one of the standard traversals of T? If so, which one?