I would link to represent a graph with incidence lists.
This picture is what I've thought about:
This is what I created:
It seems to work but when I insert more than one edge to a vertex the new edge overwrites the first one, so I can just have an edge per vertex...Code:#include <cstdlib> #include <iostream>
Can you help...?