Quiz Entry - updated: 2026.09.29
Which methods does the BinaryTree ADT add to the Tree ADT?
It inherits every Tree ADT method and adds left(p), right(p) and sibling(p).
A binary tree is still a tree, so root, parent, children, isInternal, isExternal and the rest all remain available. The three additions exist because the left/right distinction is the defining feature of a binary tree:
left(p)— the left child ofp(or nothing if it has none)right(p)— the right child ofpsibling(p)— the other child ofp's parent
children(p) alone would lose information here: it returns the children as a list, and a list with one element cannot say whether that element is the left or the right child.
sibling(p) is a convenience: it is the parent's other child, which algorithms often need (for example, when restructuring a tree after a deletion).