-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shortest path #487
Comments
Hi can i take up this issue ? |
hi @Shreya2704 can you verify if the issue is resolved ? I have done a pull request for this ...if you find this solves your problem kindly merge it or if further additions need to be made ,please list them here. |
@Sagnik-Chatterjee Well the Djikstra's algorithm can be used to find a single source shortest path, but as "To find the shortest path between 2 cities", I find it more like applying an all pair Shortest path (floyd warshall algorithm) You may consider adding a dynamic programming approach for that, you may refer to: https://www.geeksforgeeks.org/floyd-warshall-algorithm-dp-16/ |
Can i take this issue ? Let me know if you have any particular choice ! |
Maybe use discrete mathematics theory for example directed graphs and weighted graphs could solve the problem (i.e) the distance between 2 cities without a direct connection is unknown so in order to get a close reflect of the reality you could check different paths between those two cities,then adding the weights between each pair of cities from city source to destiny and that'd be all |
@manavpreetsingh Yes sure |
Can I take up this issue |
Thank you for your interest in contributing. 👍
I'll look forward to reviewing your pull request as soon as I can. Thanks. 🙂 |
In practice, e.g. in a car navigation system, the graph is preprocessed so that the distance between two cities can later be queried in e.g. O(sqrt(n) log(n)), which is a lot faster than Dijkstra's algorithm (excluding the preprocessing time). |
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions! |
To find the shortest path between 2 cities
The text was updated successfully, but these errors were encountered: