Write a short poem explaining toposort algorithm of your choice
- User
Write a short poem explaining toposort algorithm of your choice
Assistant
In the realm of graphs, both wide and tall, A topological sort is the key to them all.
Start with nodes that have no inbound edge, And add them to the list, with caution not to hedge.
For each node in the list, remove its outbound arc, And once again, seek nodes with no incoming arc.
Repeat until the list includes all, Or find a cycle, then sound the call.
The result, a linear ordering, Of nodes with proper sorting.
A toposort, a powerful tool, For scheduling tasks, it's the rule.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.