• C

linked list (for network graph)

hi,

Is it possible to struck linked at some certain points has more than one continue link?

for example, A network A-->B-->C then C can go both D and E at same time.......something like that

I search linked list examples, they always follow one by one sequence, so is it possible to set some certain situation has multiple path?
If yes, could you give me some sample code

thanks
   
rmtogetherAsked:
Who is Participating?
 
sunnycoderConnect With a Mentor Commented:
Hi rmtogether,

http://www.nist.gov/dads/HTML/graph.html
has a section on implementations

Cheers!
sunnycoder
0
 
sunnycoderCommented:
Hi rmtogether,

It is possible but the resulting data structure would not technically be a linked list ... also the format/structure of this branchng node could be different from that of other nodes ... What you seem to be looking for here is a directed acyclic graph or DAG
http://en.wikipedia.org/wiki/Directed_acyclic_graph
http://www.nist.gov/dads/HTML/directedGraph.html

Cheers!
sunnycoder
0
 
sunnycoderCommented:
Hi rmtogether,

> (for network graph)
A graph is a much better data structure to use for network graphs ... In case you have one way connections in the network, you can use a directed graph.
http://en.wikipedia.org/wiki/Graph_(data_structure)
http://en.wikipedia.org/wiki/Graph_theory
http://www.nist.gov/dads/HTML/graph.html


Cheers!
sunnycoder
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
rmtogetherAuthor Commented:
thanks,

are there any actual program code examples ?
0
 
rmtogetherAuthor Commented:
hi,

I am interested in http://www.cs.sunysb.edu/~algorith/files/graph-data-structures.shtml 
how can I find example codes of this problem? thanks in advance
0
 
sunnycoderCommented:
The page has Implementations section near bottom of the page that has links to a few implementations
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.