Complete the code to check if a value should go to the left subtree in a BST.
if value [1] node.data: # go left
In a BST, values less than the node's data go to the left subtree.
Complete the code to insert a value into the right subtree of a BST.
if value [1] node.data: # go right
In a BST, values greater than the node's data go to the right subtree.
Fix the error in the BST search condition to find a value equal to the node's data.
if node.data [1] value: return True
To find the value, check if node's data equals the value.
Fill both blanks to complete the BST insertion condition for left subtree and equality.
if value [1] node.data or value [2] node.data: # insert left
Values less than or equal to node.data go to the left subtree in this BST.
Fill all three blanks to create a dictionary comprehension that maps node data to its subtree side if value is greater than 10.
result = [1]: [2] for node, side in nodes.items() if node.data [3] 10
This comprehension maps node data to its side only for nodes with data greater than 10.
