You are viewing a single comment's thread. Return to all comments →
In python2:
def insert(r, val): if r == None: r = Node(val) elif (val < r.data): r.left = insert(r.left, val) elif (val > r.data): r.right = insert(r.right, val) return r
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Search Tree : Insertion
You are viewing a single comment's thread. Return to all comments →
In python2: