Question: Suppose that a binary search tree node is defined as class BSNode { int data; BSNode left; BSNode right; } Consider the following method of

Suppose that a binary search tree node is defined as class BSNode \{ int data; BSNode left; BSNode right; \} Consider the following method of a binary search tree class: int mystery ( BSTNode node ) \{ if (node. left == null ) return node.data; else return mystery( node. left ); Which of the following statements are true about mystery function when it is called with the root reference to a non-empty binary search tree. The statements should be true irrespective of the content and shape of the tree. It returns the value of the last node visited in the postorder traversal. It returns the smallest value in the tree. It returns the value of the first node visited in the postorder traversal. It returns the value of the first node visited in the inorder traversal. It returns the largest value in the tree. It returns the value of the last node visited in the inorder traversal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
