Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 2(e)

2 marks

Computer ScienceISC 2019 Computer Science Paper 1DifferentiateData structures

Differentiate between the following.

State the difference between internal nodes and external nodes of a binary tree structure.

Open in the Binary tree and BST tool

Answer

Answer

An internal node of a binary tree is any node that has at least one child, i.e. it is not a leaf - it may have one or two children and lies within the body of the tree. An external node (also called a leaf node) is a node that has no children at all (both its left and right child pointers are null) - it lies at the boundary/end of a branch of the tree.