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

The cost array of bellman-ford algorithm should be the previous time record #28

Open
BWbwchen opened this issue Jan 30, 2022 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@BWbwchen
Copy link
Owner

BWbwchen commented Jan 30, 2022

for (int adjecent = 0; adjecent < vertex; ++adjecent) {
if (graph[n][adjecent] != MAXN &&
cost[n] + graph[n][adjecent] < cost[adjecent] ) {
pi[adjecent] = n;
cost[adjecent] = cost[n] + graph[n][adjecent];
}
}

@BWbwchen BWbwchen changed the title The cost array should be the previous time record The cost array of bellman-ford algorithm should be the previous time record Jan 30, 2022
@BWbwchen BWbwchen added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant