Question: visited [ 1 - n ] = 0 ; finished [ 1 ] = 0 ; out 1 - - n ; stage [ 1
visited ; finished ; out ; stage ;
for i to
for to
if
out out ;
for i to
if out then go
go
visited i;
Por to
if
out out;
for to
if
if visited
if finished
end; cycle;
I need this in a simple c code that lets the user input the graph and then prints the graph after and before sorting it as a topological sort i need the same variables names and to use simple c functions
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
