top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the best way to represent a Graph in C?

+1 vote
387 views

Want to know how to represent a Graph (V,E) in C/C++.

posted Oct 22, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

There are 4 ways to represent Graph.
1.Adjacency matrices
2.Adjacency lists
3.Adjacency multilists
4.Incidence matrix

answer Oct 22, 2013 by Vikas Upadhyay
But what is best and which one is used in what case. Please put some more light on this?
Similar Questions
+3 votes

How to find shortest path in a multistage graph using dynamic programming, C/C++ code would be helpful?

+4 votes

I am trying to do something like this

char a = 10;
printf("binary representation of a = %b",a);

and expecting

0x1010
+1 vote

How to balance the binary search tree in C/C++? Please provide the necessary explanation also?

...