Does anyone know of a quick efficient way of both keeping track of the number of arcs (connections) each node has (and preferably to which other nodes it is connected). And a way of detecting if a "circuit" has been formed within a group of nodes.

I need to be able to do this in both VB and C.

I'm having trouble storing both the numerous nodes and the seemingly limitless potential connections!

Any ideas?