We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
虽然此题保证了输入数据是互不相同的,但是模板中
root->right = insert(root->right, val); if (getHeight(root->left) - getHeight(root->right) == -2) root = val > root->right->val ? rotateLeft(root) : rotateRightLeft(root);
其中的判断应该修改为 val > root->right->val ,否则在多次插入同一个数据时会死循环.
val > root->right->val
hack数据
5 70 70 70 70 70
The text was updated successfully, but these errors were encountered:
No branches or pull requests
虽然此题保证了输入数据是互不相同的,但是模板中
其中的判断应该修改为
val > root->right->val
,否则在多次插入同一个数据时会死循环.hack数据
The text was updated successfully, but these errors were encountered: