(root, p, q)
| 81 | return commonAncestorHelper(root.right, p, q) |
| 82 | |
| 83 | def commonAncestor(root, p, q): |
| 84 | if (not covers(root, p)) or (not covers(root, q)): |
| 85 | return None |
| 86 | else: |
| 87 | return commonAncestorHelper(root, p, q) |
| 88 | # test |
| 89 | bst2 = BinarySearchTree() |
| 90 | n1 = TreeNode(0) |
no test coverage detected