You are viewing a single comment's thread. Return to all comments →
Python solution:
def insert(r,val): if r is None: r = Node(val) elif r.data > val: r.left = insert(r.left, val) elif r.data < val: r.right = insert(r.right, val) return r
Binary Search Tree : Insertion
You are viewing a single comment's thread. Return to all comments →
Python solution: