Bellman Ford Algorithm

IN THE CODE OF BELLMAN FORD WRITTEN BY SANKET SINGH,WHAT IS THE USE OF COUNT VARIABLE IN ADDEDGE FUNCTION

PS:-I HAVENT WRITTEN THE CODE FOR IT TILL NOW AS I AM WATCHING IT AND THEN ASKING THIS QUESTION.PLEASE DO NOT ASK FOR THE CODE.

@itsexp_2302 The count is just used to number the edges, just like indexing we do in array for elements similarly here we are doing for the edges. So that later when we want to access the edge then we can do it by count.
fro eg:- 3 edges (a,b) (b,c) (c,d) then count will be 1,2,3 respectively for them

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.