Skip to content
New issue

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

[内容有误] 红黑树-删除后的平衡维护-case5 中的颜色判断与对应代码 #5594

Open
1 task done
skywong14 opened this issue May 11, 2024 · 1 comment
Open
1 task done
Labels
Content Bug / 页面内容有误 Something isn't working help wanted / 需要帮助 Extra attention is needed

Comments

@skywong14
Copy link

skywong14 commented May 11, 2024

请选择:

  • 我正在着手修复这个问题

我正在访问这个页面

https://oi-wiki.org/ds/rbtree/#case-5_1

我发现页面有这样的问题

case5

如图所示,如果进入maintainAfterRemove时的树结构如图,在经过Case1处理后会到达下图所示的结构,但这个结构不会被Case2-5中的任何情况接受,甚至会触发case5的assert语句。
如果把case5中“close nephew颜色限制为黑色”删除就可以使这种情况在case5被正常处理。
即case5中父节点和close nephew节点均既可为红色又可为黑色。

@skywong14 skywong14 added Content Bug / 页面内容有误 Something isn't working help wanted / 需要帮助 Extra attention is needed labels May 11, 2024
Copy link

welcome bot commented May 11, 2024

感谢你对 OI Wiki 的关注!记得在 Issue 中表达清楚自己的意思哦~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Bug / 页面内容有误 Something isn't working help wanted / 需要帮助 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant