bfs(I am not distance, what's wrong in the code)

I am not distance, what’s wrong in the code

hello @samardeep could you please elaborate about what do you mean by "i am not distance "?

ohhh sooryyyyy… I am not getting distance from source node

okay wait i will see your code but please confirm you are solvinf bfs shortest path question ?

yes,its bfs shortest path

@samardeep okay wait

hello @samardeep

u have reopened ur doubt .
pls check updated code here->

hey
@samardeep there was a silly mistake there in your code you have to update the distance of the source as zero all other nodes distance to int max .
and there was another error in line 30 .


check the updated code here:
if you have any doubt you can ask here .
Happy Learning !!

hey @aman212yadav are you taking this doubt ?

yeah ,he reopned his doubt so i have taken

though we both have replies .its fine for him now .

thank you, I found my mistake

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.