I am not distance, what’s wrong in the code
bfs(I am not distance, what's wrong in the code)
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
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 !!
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.