Correction: Change this line (2 occurrences) : node_data[neighbor]['pred'] = node_data[neighbor]['pred'] + list(itr) to this -> node_data[neighbor]['pred'] = node_data[itr]['pred'] + [itr] [Note: Code is updated on our website and android app)
Hi, Good job brother. I wanted to use this algorithm to find best currency conversion from the list of given json data which contains array of elements like fromCountry, toCountry & exchangeRate. There might be multiple route to exchange but I want to get path which gives me maximum rate after conversion. I'm really stuck brother, can you please help me in any way? Thanks for your good work!
@@ThinkXAcademy sir you are already in loop for that particular neighbour and also above this line you have already changed the cost node_data[neighbor]['cost'] = cost when cost < node_data[neighbor]['cost']. why will it be infinite then?
Hello Dear ! I applied a network with 24 node and 76 links, based on your algorithm but it doesn't work, i think there is something more about the, predecessors because in result, when i see the iterations, in links there is one predecessor for each link. its not correct because in networks with more node and links there is more predecessor for each link. if you find out please share with me. I tried to find your email but couldn't.
Correction:
Change this line (2 occurrences) : node_data[neighbor]['pred'] = node_data[neighbor]['pred'] + list(itr)
to this -> node_data[neighbor]['pred'] = node_data[itr]['pred'] + [itr]
[Note: Code is updated on our website and android app)
where i can find next tutorial ? i need to know next line of program to know Graph contains negative weight cycle. thanks! nice explanation
Here: ua-cam.com/video/-WlOCaSdfUE/v-deo.html
Please do a video on jhonspn algorithm
I will take a look at it.
Hi,
Good job brother.
I wanted to use this algorithm to find best currency conversion from the list of given json data which contains array of elements like fromCountry, toCountry & exchangeRate. There might be multiple route to exchange but I want to get path which gives me maximum rate after conversion. I'm really stuck brother, can you please help me in any way?
Thanks for your good work!
Thanks😄 Share our channel with other students to help them too💫
I could not understand the if noda_data['cost'] == inf part. I don't this this ever happens.
Hi, cost of the node is assigned to infinite which logically implies that node is not visited yet.
@@ThinkXAcademy sir you are already in loop for that particular neighbour and also above this line you have already changed the cost node_data[neighbor]['cost'] = cost when cost < node_data[neighbor]['cost']. why will it be infinite then?
Hello Dear !
I applied a network with 24 node and 76 links, based on your algorithm but it doesn't work, i think there is something more about the, predecessors because in result, when i see the iterations, in links there is one predecessor for each link. its not correct because in networks with more node and links there is more predecessor for each link. if you find out please share with me.
I tried to find your email but couldn't.
Thanks for pointing out the mistake. I have resolved it in code on our website and have mentioned that in the pinned comment.
Would this code work with negative cycles/loops in graph?
For negative cycles consider this video: ua-cam.com/video/-WlOCaSdfUE/v-deo.html
@@ThinkXAcademy Thank you, you are very nice person! Really help me
It's possible to have the .py file ?
You can find the code on the website: www.thinkxacademy.com
@@ThinkXAcademy thank you
where do i find the code?
www.thinkxacademy.com/Data%20Structures%20in%20Python/
Under this course you will see this video just click on it and you will see the code.