Question: please help out class BTNode: '''Binary Tree Node class - do not modify''' def __init__(self, value, left, right): '''Stores a reference to the value, left

 please help out class BTNode: '''Binary Tree Node class - do

please help out

class BTNode: '''Binary Tree Node class - do not modify''' def __init__(self, value, left, right): '''Stores a reference to the value, left child node, and right child node. If no left or right child, attributes should be None.''' self.value = value self.left = left self.right = right

class BST: def __init__(self): # reference to root node - do not modify self.root = None

def insert(self, value): '''Takes a numeric value as argument. Inserts value into tree, maintaining correct ordering. Returns nothing.''' pass

def search(self, value): '''Takes a numeric value as argument. Returns True if its in the tree, false otherwise.''' pass

def height(self): '''Returns the height of the tree. A tree with 0 or 1 nodes has a height of 0.''' pass

def preorder(self): '''Returns a list of the values in the tree, in pre-order order.''' pass

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!