The GATE Grind

GATE 2008 CS – Question 46

Programming and Data Structures · Trees and Binary Search Trees · 2 marks · Multiple choice

Given postorder P of a BST containing1, 2, …, n, what is the most efficient complexity for determining the unique BST with that traversal?

  1. $\Theta(\log n)$
  2. $\Theta(n)$
  3. $\Theta(n\log n)$
  4. None; tree cannot be uniquely determined.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $\Theta(n)$

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Trees and Binary Search Trees questions

All Trees and Binary Search Trees questions →