Skip to content

Add topological sorting using Khan's algorithm#2705

Closed
thejeswar2419 wants to merge 1 commit intokeon:mainfrom
thejeswar2419:add/topo_sort_khan
Closed

Add topological sorting using Khan's algorithm#2705
thejeswar2419 wants to merge 1 commit intokeon:mainfrom
thejeswar2419:add/topo_sort_khan

Conversation

@thejeswar2419
Copy link
Copy Markdown

Kahn’s Algorithm provides a clear and efficient way to perform topological ordering while also offering built-in cycle detection and avoiding recursion-depth issues.

@keon
Copy link
Copy Markdown
Owner

keon commented Feb 17, 2026

Thanks for the contribution! We already have Kahn's algorithm in algorithms/graph/kahns_algorithm.py and topological sort variants in topological_sort_bfs.py / topological_sort_dfs.py. Closing as duplicate.

@keon keon closed this Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants