GATE CS 2011 · Question 29 · Programming and Data Structures · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?

  1. (A) 0
  2. (B) 1
  3. (C) n!
  4. (D) 1/(n+1) · ²ⁿCₙ
Answer

Answer (B)

Answer from the official GATE CS 2011 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes