All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · June 2024 (Cancelled)

Which of the following are true for a complete binary tree?

A. It has always odd number of vertices.

B. With i internal vertices, it has i+1 leaves.

C. With l leaves, it has 2l-1 vertices.

D. With 2 n-1 vertices, it has n leaves.

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

Show answer & explanation

Correct answer: D. A, B, C, D

Explanation

Here 'complete' means every internal node has two children. Then leaves = internal + 1, total nodes = 2l − 1 (always odd), and 2n − 1 nodes means n leaves. All four statements hold.

More Data Structures and Algorithms questions