AOA want to search for the number 363.

AOA ASSINGMENT#2 Group members NAME: Roll NumbersMuntahir ali BCSM-S16-020Faran Ahmad BCSM-S16-001Mubeen Ahmed BCSM-S16-021 ?Q: Suppose that we have numbers between 1 and 1000 in a binary search tree, and wewant to search for the number 363. Which of the following sequences could not bethe sequence of nodes examined?a. 2, 252, 401, 398, 330, 344, 397, 363.b. 924, 220, 911, 244, 898, 258, 362, 363.c.

925, 202, 911, 240, 912, 245, 363.d. 2, 399, 387, 219, 266, 382, 381, 278, 363.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

e. 935, 278, 347, 621, 299, 392, 358, 363.ANSWERIn this question the part (c) and part (e) is not a sequence of node examined because in part (c) the value of 912 is greater then 911 and in part (e) the value of 347 is greater then 299Therefore the left side of a child is must be smallest then their root nodeQ: Professor Bunyan thinks he has discovered a remarkable property of binary searchtrees. Suppose that the search for key k in a binary search tree ends up in a leaf.

Consider three sets: A, the keys to the left of the search path; B, the keys on thesearch path; and C, the keys to the right of the search path. Professor Bunyanclaims that any three keys a € A, b € B, and c € C must satisfy a

x

Hi!
I'm Mary!

Would you like to get a custom essay? How about receiving a customized one?

Check it out