Finding Minimum Element in a BST:

def findMin(root):
    currentNode = root

    if currentNode == None:
        return None
    while currentNode.left != None:
        currentNode = currentNode.left

    return currentNode.data

results matching ""

    No results matching ""