BST/bst_codeschool.cpp
//To search an element in BST, returns true if element is found
To search an element in BST, returns true if element is found
To search an element in BST returns true if element is found
bool Search(BstNode* root, int data)
{
	if (root == NULL)
	{
		return false;
	}
	else if (root->data == data)
	{
		return true;
	}
	else if (data <= root->data)
	{
		return Search(root->left, data);
	}
	else
	{
		return Search(root->right, data);
	}
}
bool Search ( BstNode * root , int data ) { if ( root == NULL ) { return false ; } else if ( root -> data == data ) { return true ; } else if ( data <= root -> data ) { return Search ( root -> left , data ) ; } else { return Search ( root -> right , data ) ; } }
To search an element in BST, returns true if element is found
To search an element in BST returns true if element is found