Traverse through the first tree until you reach the leftmost element , which is the first element of the tree in the inorder traversal . This is the least element of the tree
while ( temp1 . left ) : NEW_LINE INDENT prev1 = temp1 NEW_LINE temp1 = temp1 . left NEW_LINE DEDENT