Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Let T(n) be the number of different binary se... Start Learning for Free
Let T(n) be the number of different binary search trees on n distinct elements. Then 
 where x is
  • a)
    n-k+1
  • b)
    n-k
  • c)
    n-k-1
  • d)
    n-k-2
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Let T(n) be the number of different binary search trees on n distinct ...
The idea is to make a key root, put (k-1) keys in one subtree and remaining n-k keys in other subtree. A Binary Search Tree (BST) is a tree in which all the nodes follow the below-mentioned properties −
  • The left sub-tree of a node has a key less than or equal to its parent node's key.
  1. The right sub-tree of a node has a key greater than to its parent node's key.
Now construction binary search trees from n distinct number- Lets for simplicity consider n distinct numbers as first n natural numbers (starting from 1) If n=1 We have only one possibility, therefore only 1 BST. If n=2 We have 2 possibilities , when smaller number is root and bigger number is the right child or second when the bigger number is root and smaller number as left child.  
If n=3 We have 5 possibilities. Keeping each number first as root and then arranging the remaining 2 numbers as in case of n=2.
n=4 We have 14 possibilities. Taking each number as root and arranging smaal numbers as left subtree and larger numbers as right subtree.
 
Thus we can conclude that with n distinct numbers, if we take ‘k’ as root then all the numbers smaller than k will left subtree and numbers larger than k will be right subtree where the the right subtree and left subtree will again be constructed recursively like the root. Therefore,
View all questions of this test
Explore Courses for Computer Science Engineering (CSE) exam
Question Description
Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer?.
Solutions for Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Let T(n) be the number of different binary search trees on n distinct elements. Thenwhere x isa)n-k+1b)n-kc)n-k-1d)n-k-2Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam
Signup to solve all Doubts
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev