countFullNodes<T> function
Implementation
int countFullNodes<T>(BinaryTreeNode<T>? root) {
if (root == null) return 0;
int count = 0;
if (root.left != null && root.right != null) count = 1;
return count + countFullNodes(root.left) + countFullNodes(root.right);
}