例如{Range:4,6}将返回[4,5,5,6]:
答案 0 :(得分:1)
def allInRange(bst, left, right):
if bst is EmptyValue:
return
if left <= bst.root <= right:
print(bst.root)
allInRange(bst.left, left, right)
allInRange(bst.right, left, right)