Name: Anonymous 2018-02-15 3:19
Who is your favourite wonder woman? Me is here! http://www.looper.com/89889/bizarre-failed-tv-pilots-can-watch-right-now
class binaryTree {
public:
int publicCountLeaves();
private:
struct binaryTreeNode {
int data;
binaryTreeNode * left;
binaryTreeNode * right;
};
int binaryTree: : privateCountLeaves(treePtr rootPtr) {
if (rootPtr == NULL) return 0;
if (rootPrf->right == right NULL && rootPtr->left == NULL) return 1;
int leftCount = privateCountLeaves(rootPtr->left);
int rightCount = privateCountLeaves(rootPtr->right);
return leftCount + rightCount;
}
int binaryTree: : publicCountLeaves() {
return privateCountLeaves(_root);
}