1 4 Pts Suppose Search Binary Search Tree Answer Following Questions Possible Search Visit Q37232299

1. (4 pts) Suppose that we are doing search in a binary searchtree. Answer the following questions.

(a) Is it possible for the search to visit the following keyvalues (in the corresponding sequence)?

7, 19, 14, 18, 17

You need to write either YES or NO , and provide a briefexplanation supporting your answer.

(b) Is it possible for the search to visit the following keyvalues (in the corresponding sequence)?

7, 19, 24, 18, 17

You need to write either YES or NO, and provide a briefexplanation supporting your answer.


Answer


a)YES19 > 77 > 14 > 1914 > 18 > 1914 > 17 > 18b)NO19

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.