Floyd warshall algorithm

distance are not getting updated

hello @guptashubham210a

checking . . . . . . .

@guptashubham210a

it is getting updated.

what is correct output for ur given input?

@aman212yadav
0 -1 -2 0
4 0 2 4
5 1 0 2
5 -1 1 0

@guptashubham210a
use long long ,due to overflow it is giving weird output .

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.