ACtE05 · Chapter 5Programming & Applications🏛️ Past Licensure QuestionID: 352faebe
In data structures, two binary trees are said to be 'equivalent' if:
In data structures, two binary trees are said to be 'equivalent' if:
Multiple Choice Options
- A
They have identical structure but different values
- B
They have the same number of nodes
- C✓ Correct Option
They have identical structure and identical node values
- D
They are both height-balanced
Detailed Technical Solution & Explanation
Two trees are termed 'similar' if they have the exact same structural topology, whereas they are termed 'equivalent' (or equal) if they have both identical topology and identical data values in corresponding nodes.
Option Analysis:
•
Option A (They have identical structure but dif...): This defines 'similar' trees.
•
Option B (They have the same number of nodes): Having the same node count does not imply structural or value equality.
•
Option C (They have identical structure and ide...): Correct. Equivalent trees match in both topology and content.
•
Option D (They are both height-balanced): Defines AVL or balanced trees, not equivalence between two trees.
Reference: Mock Test 04NEC Licensure Syllabus