Question: Python program involving topological sort what's a coded program of a topological sort in python involving strings that takes tasks and outputs either a valid

Python program involving topological sort

what's a coded program of a topological sort in python involving strings that takes tasks and outputs either a valid order or a word cycle if the list contains a cycle of any size

the tasks are put in a .list file and the program will input and output via standard input and output, an example of a .list is

learn python Read the python tutorial do exercise 1 learn python

and the solution for the list is

Read the python tutorial learn python do exercise 1

an example of a cycle list

get a job have experience have experience work on a job work on a job get a job

the answer for this list is

cycle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!