递归
BinarySearchTreeNode findMin(BinaryTreeNode root){
if(root == null){
return null;
}
else{
if(root.getLeft() == null)
return root;
else
return findMin(root.getLeft());
}
}
非递归
BinarySearchTreeNode findMin(BinaryTreeNode root){
if(root == null){
return null;
}
while(root.getLeft() != null){
root = root.getLeft();
}
return root;
}