This commit is contained in:
programmercarl
2023-09-19 16:21:37 +08:00
parent ab4c44d2a3
commit 631b333c08
9 changed files with 17 additions and 34 deletions

View File

@@ -261,7 +261,7 @@ public:
vector<int> findMode(TreeNode* root) {
count = 0;
maxCount = 0;
TreeNode* pre = NULL; // 记录前一个节点
pre = NULL; // 记录前一个节点
result.clear();
searchBST(root);