I've been seeing such questions for a long time now and I haven't been able to catergorize it. Hoping someone could help me here. The question contains pairs of points and a cost. You're given 1 2 C0, meaning you can go from 1 to 2 with cost C0. We have N such points and have to reach 1 to some point, say N. What's the minimum cost of it? Ex
1 2 3
2 3 1
1 3 1
3 4 2
2 4 1
In this case, you'd go from 1->3>4 with total cost 3 (1+2). How do I go about solving this?