Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3) BST - Diagram Given the following two trees, answer the questions below Tree

ID: 3749665 • Letter: 3

Question

3) BST - Diagram Given the following two trees, answer the questions below Tree S) Tree T) Node X 50 60 30 80 Node Y 40 40 90 50 75 90 15 253545 75 95 10 70 95 Node Z 65 A.) What is the height and depth of: [3 points each] i.) Node X-HeightD i.) Node Y- Height_D iii.) Node Z-Height Depth Depth Depth: B.) Fill in the bubble to the left of your response i.) Which of the trees is a BST? [2 points] O Tree s O Tree T O Neither TreeBoth Trees ii) Which of the trees is complete? [3 points] O Tree S O Tree T O Neither Tree O Both Trees C.) Is the given node a leaf or not a leaf? [2 points eachl i.) Node X: ii.) Node Y lii.) Node Z:

Explanation / Answer

A)
Node X
Height = 4
Depth = 0

Node Y
Height = 0
Depth = 2

Node Z
Height = 0
Depth = 3

Explanation
Depth is calculated by counting from rood node till the node we want, starting from 0.
Height of a node is calculated by counting from leaf that is farthest from that node starting from 0.

B)
Binary Search Trees: Trees with at most 2 children for every node.
Left sub tree has numbers that are less and right has greater numbers.
i) Only Tree S is BST

Note: 4 sub parts at a time please -- Policy of Chegg

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote