Skip to content
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

Added example dijkstra algorithm #1571

Closed

Conversation

Irene-123
Copy link

@Irene-123 Irene-123 commented Dec 29, 2022

Hello. I've written a smart contract which is an implementation of the Dijkstra Algorithm to find the shortest path between 2 nodes.
The smart contract uses another file graph.in which has the vec(source, destination, cost) and the result is printed. Though this is a very basic implementation of rust which is quite academic but if you find it useful and worthy please accept my project.

@SkymanOne
Copy link
Contributor

Hi @Irene-123. Thank you for your effort.
I can see that you added a diagram and README for the DNS example which is not mentioned in your PR and goes beyond the scope of it.
Could you please open a separate PR for this one?

With regard to your Dijkstra Algorithm, it is definitely a cool idea. However, it doesn't utilise any ink! API and can not be deployed on chain. I advise you to go to ink! docs and leverage ink! API to turn your code into a deployable contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants