protected void traverse(TreeNode node, Map<TreeNode, TreeNode> parent) {
		if (!node.isLeaf()) {
			TreeInteriorNode interiorNode = (TreeInteriorNode) node;
			if (interiorNode.left != null) {
				parent.put(interiorNode.left, node);
				traverse(interiorNode.left, parent);
			}
			if (interiorNode.right != null) {
				parent.put(interiorNode.right, node);
				traverse(interiorNode.right, parent);
			}
		}
	}