Question: int nBST(TreeNode *root) f return (root)? (root- left II root-right) nBST(root->right) : 0; } nBST(root-left) This is how you are not supposed to write code

int nBST(TreeNode *root) f return (root)? (root- left II root-right) nBST(root->right) : 0; } nBST(root-left) This is how you are not supposed to write code unless you are writing obfuscated code. But what does the code do? Returns the height of the tree returns the number of internal nodes i.e a node which has at least one child searches for the node in the tree returns the minimum distance between the root and the leaf nodes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
