Skip to content

khllkcm/Topological-Graph-Sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Topological Graph Sort

Input

The input begins with a line containing two integers, 1 ≤ N ≤ 100 and K. N is the number of your tasks (numbered from 1 to N) and K is the number of direct precedence relations between tasks. After this, there will be K lines with two integers a and b, representing the fact that task 'a' must be executed before task 'b'.

Output

Only print one line with N integers representing the ordred tasks(how you've actually decided to execute them).

Source: Think-IT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages