标签:int tco sea == leetcode turn col etc ret
class Solution { public: TreeNode* searchBST(TreeNode* root, int val) { if (root == NULL) { return nullptr; } if (root->val == val) { return root; } else if (root->val > val) { return searchBST(root -> left, val); } else//root->val>val { return searchBST(root->right, val); } } };
标签:int tco sea == leetcode turn col etc ret
原文地址:https://www.cnblogs.com/asenyang/p/9714956.html