saying in given graph , src---> dest ,each node has cost , edge have latency(weight) , tell min cost to reach , such that latency<maxlatecy , got quite confused that time , i got dijkastra in mind but in that time, felt it difficuilt to mold it acc. to need,
n no. of nodes
m no. of edges
m line with u ,v ,latency of channel (weight)
u1 , v1 , w1
----
um , vm , wm
cost array of size n , for each node 0---n-1
src , dest
max latency allowed
6
6
0 1 10
0 3 1
1 2 10
2 5 10
3 4 10
4 5 15
5 1 2 20 20 3 (cost array)
0 5
30 (max latency allowed)
output ---> 11 (0--->1--->2--->5)