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
feat(graph/topo.md): 将伪代码改为中文 #5458
Conversation
将伪代码改为中文
感谢你对 OI Wiki 的关注!记得检查是否遵守了格式规范,听说和项目风格统一的 Pull Request 会更容易被 Merge~ |
很好。伪代码修改有若干方向:
|
@@ -95,23 +95,21 @@ $$ | |||
|
|||
不断重复以上过程,直到集合 $S$ 为空。检查图中是否存在任何边,如果有,那么这个图一定有环路,否则返回 $L$,$L$ 中顶点的顺序就是构造拓扑序列的结果。 | |||
|
|||
首先看来自 [Wikipedia](https://en.wikipedia.org/wiki/Topological_sorting#Kahn's_algorithm) 的伪代码 | |||
首先看来自 [Wikipedia](https://zh.wikipedia.org/wiki/%E6%8B%93%E6%92%B2%E6%8E%92%E5%BA%8F) 的伪代码 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
链接不要换,因为 Wikipedia 那边同一个页面不同语言的版本可能有较大差异。
while S is not empty do | ||
remove a node n from S | ||
insert n into L | ||
for each node m with an edge e from n to m do | ||
remove edge e from the graph | ||
if m has no other incoming edges then | ||
insert m into S |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while
和 for
建议保留
你好 👋 这个 Pull Request 已经 30 天未响应。 感谢理解与支持。 |
将伪代码改为中文