1 Suppose Numbers 1 100 Binary Search Tree Want Search Number 34 Following Sequences Canno Q37123256

1. Suppose that we have numbers between 1 and 100 in a binarysearch tree and want to search for the number 34. Which of thefollowing sequences CANNOT be the sequence of nodes examined?

a. 10, 56, 45, 18, 25, 31

b. 89, 43, 10, 17, 37, 30

c. 20, 56, 32, 37, 41, 18

d. 42, 9, 11, 29, 39,35

2. What are the worst-case complexities of insertion anddeletion of a key in a binary search tree?

a. O(n) for both insertion and deletion

b. O(logn) for both insertion and deletion

c. O(n) for deletion, O(logn) for insertion

d. None of the above


Answer


1.c. 20, 56, 32, 37,

OR
OR

Leave a Comment

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