mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
Take for example a text file which contains:

7
6 3
3 8 5
11 2 10 9

Think of the above as a triangle of adjacent nodes.

The minimum path in this case is 7 + 6 + 3 + 2 = 18

If you were to design an algorithmn to specify this, would you compute ALL possible paths and store them somewhere and compute the smallest one at the end?

Is there a quicker way of doing it?

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard