Demo entry 6789523

node

   

Submitted by anonymous on Apr 30, 2019 at 06:39
Language: C++. Code size: 202 Bytes.

int BinarySearchTree::NodeCount(Node* &p)
{
	if(p==NULL)return 0;
	if(p->lLink==NULL&&p->rLink==NULL)return 1;
	int numL=NodeCount(p->lLink);
	int numR=NodeCount(p->rLink);
	return 1+numL+numR;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).