4. Consider the following binary tree (which is not a binary search tree): 113 HI118 HR a) Give the depth of node Y: b) Give the height of the tree: c) Traverse the tree and print the keys in each of the nodes. Give the output for each of the following types of traversal: 1) In-order ii) Pre-order 111) Post-order

icon
Related questions
Question
100
4.
Consider the following binary tree (which is not a binary search tree):
HR
a) Give the depth of node Y:
b) Give the height of the tree:
V
types of traversal:
c) Traverse the tree and print the keys in each of the nodes. Give the output for each of the following
1) In-order
11) Pre-order
111) Post-order
#B
N
hp
24
Transcribed Image Text:100 4. Consider the following binary tree (which is not a binary search tree): HR a) Give the depth of node Y: b) Give the height of the tree: V types of traversal: c) Traverse the tree and print the keys in each of the nodes. Give the output for each of the following 1) In-order 11) Pre-order 111) Post-order #B N hp 24
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer