C++简洁代码/递归一行:
二叉树的深度
http://www.nowcoder.com/questionTerminal/435fb86331474282a3499955f0a41e8b
C++简洁代码/递归一行:
class Solution { public: int TreeDepth(TreeNode* pRoot) { return !pRoot ? 0 : max(TreeDepth(pRoot->left), TreeDepth(pRoot->right)) + 1; } };