Skip to content

Commit 06ff1eb

Browse files
committed
fix(test): correct expected shortest path distance
1 parent 4501ac2 commit 06ff1eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Graphs/test/BellmanFordNegativeCycle.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('should find shortest distance without negative cycle', () => {
1414
const result = bellmanFordNegativeCycle(graph, 4, 0)
1515

1616
expect(result.hasNegativeCycle).toBe(false)
17-
expect(result.dist[3]).toBe(6) // shortest distance from 0 to 3
17+
expect(result.dist[3]).toBe(5) // shortest distance from 0 to 3
1818
})
1919

2020
test('should detect negative cycle', () => {

0 commit comments

Comments
 (0)