About the relaxation step

why are we repeating it for maxm v-1 times?
The largest path length connecting v vertices is v-1 but what is it’s connection to this relaxation step?

In the video it’s clearly explained by bhaiya, you are understanding it when you are taking least connected edges and moving from source to destination. Bhaiya did explained it while he was going from destination to source and also comparing to all edge parts. I would suggest you to watch video one more time. If there’s still an issue. You can still ask :slight_smile:

This was the explanation for v-1 time, why we were going for vth time is to identify if there’s a negative cycle in the graph or not. If we have to iterate for vth time, that means there’s a negative cycle in the graph.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.