Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
2.2k views
in Computer by (69.2k points)

Professor Banyan thinks he has discovered a remarkable property of binary search trees. Suppose that the search for key k in a BST ends up in leaf. Consider three sets (1) set A, the keys to the left of the search path, (2) set B the keys on the search path and (3) set C, the keys on the right of the search path. Professor Banyan claims that any three keys a ∈ A, b ∈ B and c ∈ C must satisy a ≤ b ≤ c . Is his claim true? Otherwise give a counter example to the professor’s claim.

1 Answer

+1 vote
by (69.8k points)
selected by
 
Best answer

Professor Banyan claim is completely wrong.

The claim of professor Banyan is wrong. Counter example is given below.

Let the key to be searched is 70 then: 

Set A = {45, 55}, B = {40, 50, 60, 70}and C = {} 

Here is very clear that 45 ≤ 40 OR 55 ≤ 50

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...