Function tree node contains value

tree search node

Format:

tree node contains value

Input:

any node -
any value -

Output:

list - None

Conditional properties that reference this function:

  • if val < a, then tree (node (a, left, right)) contains val = tree left contains val (link)
  • if val > a, then tree (node (a, left, right)) contains val = tree right contains val (link)
  • if val = a, then tree (node (a, left, right)) contains val = True (link)


Comments

Please log in to add comments