All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2022 Shift 2

How many different binary trees are possible with n nodes?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. (1/(n+1)) · C(2n, n)

Explanation

The number of binary tree shapes with n nodes is the nth Catalan number, C(2n, n)/(n + 1).

More Data Structures and Algorithms questions