LOGBOOK

HELP

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 of p (or nothing if it has none)
  • right(p) — the right child of p
  • sibling(p) — the other child of p'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).

From Quiz: ADS / Trees: Structure, Storage and Traversals | Updated: Sep 29, 2026