Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

visited [ 1 - n ] = 0 ; finished [ 1 ] = 0 ; out 1 - - n ; stage [ 1

visited [1-n]=0; finished [1]=0; out 1--n; stage [1-n]=1;
for i=0 to n
for j1 to n
if G[i][j]=1
out [i]= out [i]+1;
for i=1 to n
if out [i]=0 then go(i)
go(i)
visited [i]=1;
Por j=1 to n
if G[j][i]=1
out [i]=out[i]+1;
for i=1 to n
if G[i][j]=1
if visited [j]=1
if finished =0
[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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

=+What is the nature of the plant or site-level role of unions?

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

What are Fringe Benefits ? List out some.

Answered: 1 week ago