Question: visited [ 1 - - ] = 0 ; finished [ 1 - ] = 0 ; out 1 - - ; stage [ 1

visited [1--]=0; finished [1-]=0; out 1--; stage [1-]=1;for =1 to for 1 to if [][]=1out []= out []+1;for =1 to if out []=0 then @()()visited [i]=1;for =1 to if [][]=1out []=out[]+1;for =1 to if [][]=1if visited []=1if finished =0end; cycle;else go()()stage []stage[]finished []=1
I need a simple c code which uses simple c functions ( and exact variable and function in the prevoious pseudo code ) that allows the user to input a graph then the graph will be print sorted as a topological sort) please explain the code line by line
 visited [1--]=0; finished [1-]=0; out 1--; stage [1-]=1;for =1 to for

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!