On Monday, 29 July 2013 11:07:52 UTC+3, (E-Mail Removed) wrote:

> I have an undirected graph. The edges are 1-2, 1-3, 2-4, 3-4.

> I should find the paths between node 1 and 4. I will have roughly

> 50 of the nodes, so I need an efficient algorithm. Is there a sample

> code (c++) or any suggestions to use?
C++ standard library does not contain graphs. On the other hand internet

is full of various (more or less problem-oriented) graph implementations.

Most work with millions of edges and vertices nicely.

Boost.Graph library is perhaps most generic. It is so generic that it

may take some time to declare all the details. It has piles of graph

algorithms in it.

50 vertices sounds a bit like homework. If so then better roll your own,

your professor won't buy that you wrote Boost.Graph.

If you meet

some particular issue then come back and ask.