Consider a binary tree 𝑇 in which every node has either zero or two children.…

GATE Β· 2025 Β· CS Β· Set 2 Β· Computer Science & IT

Consider a binary tree 𝑇 in which every node has either zero or two children. Let 𝑛 > 0 be the number of nodes in 𝑇.

Which ONE of the following is the number of nodes in 𝑇 that have exactly two children?

  1. A.

    \(\frac{n - 2}{2}\)

  2. B.

    \(\frac{n - 1}{2}\)

  3. C.

    \(\frac{n }{2}\)

  4. D.

    \(\frac{n + 1}{2}\)

Attempted by 387 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…