q11EvalBooleanBinaryTreeP
solutions.q11EvalBooleanBinaryTreeP
Question 11 [PY]
Evaluate a Boolean Binary Tree
Given a full binary tree \(B\) such that,
- Leaf nodes bear binary truth values, i.e.
True
orFalse
; and - Non leaf nodes bear values that represent logic
gates, namely
AND
orOR
.
WAP to evaluate the boolean binary tree \(B\) and return the result.
See also: Bbt
Functions:
Name | Description |
---|---|
q11EvalBooleanBinaryTreeP |
Args: |