Given a binary search tree, write the definition of the memeber function btween that takes a lower bound lower and an upper bound upper and outputs all of the data elements x in the tree between lower and upper.

template <class Type>
void bSearchTreeType<Type>::between (const Type& lower, const Type& upper) const
{
	betweenHelper (root, lower, upper);
}

template <class Type>
void bSearchTreeType<Type>::betweenHelper (const binaryTreeNode<Type>* ptr, const Type& lower, const Type& upper) const
{
	if (ptr == NULL)
		return;
	
	if (ptr->info > lower && ptr->info < upper)
		cout<<ptr->info<<' ';

	betweenHelper (ptr->llink, lower, upper);
	betweenHelper (ptr->rlink, lower, upper);
}
		

Reimplement a recursive version of search function

template <class Type>
bool bSearchTreeType<Type>::searchRecursive (const Type& searchItem) const
{
	return searchRecursiveHelper (root, searchItem);
}

template <class Type>
bool bSearchTreeType<Type>::searchRecursiveHelper (const binaryTreeNode<Type>* ptr, const Type& searchItem) const
{
	if (ptr == NULL)
		return false;
	else if (searchItem == ptr->info)
		return true;
	else if (searchItem < ptr->info)
		return searchRecursiveHelper (ptr->llink, searchItem);
	else 
		return searchRecursiveHelper (ptr->rlink, searchItem);
}	return base * Power (base, exponent - 1);
}