Considering that the root node starts from level 1, the maximum number of…
2024
Considering that the root node starts from level 1, the maximum number of nodes at level 'l' of a binary tree is:
- A.
2^l
- B.
2^(l-1)
- C.
l^2
- D.
l!
Attempted by 365 students.
Show answer & explanation
Correct answer: B
The maximum number of nodes at any level 'l' of a binary tree is given by 2^(l-1). Here, the level 'l' is considered starting from 1 for the root node.
In a binary tree, each node can have at most 2 children.
If the root is at level 1, then:
Level 1 → 2^0 = 1 node
Level 2 → 2^1 = 2 nodes
Level 3 → 2^2 = 4 nodes
Level l → 2^{l-1} nodes
So, the maximum number of nodes at level l is:
2^{l-1} nodes