Skip to content

Commit bc2476f

Browse files
iampratik13Copilot
andauthored
Update graph_algorithms/floyd_warshall.r
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6c38f73 commit bc2476f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

graph_algorithms/floyd_warshall.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ demonstrate_floyd_warshall <- function() {
233233
path_result <- fw$get_path(1, 4)
234234
cat("\nShortest path from 1 to 4:\n")
235235
cat(sprintf("Path: %s\n", paste(path_result$path, collapse = "")))
236-
cat(sprintf("Distance: %d\n\n", path_result$distance))
236+
cat(sprintf("Distance: %g\n\n", path_result$distance))
237237

238238
# Example 2: Graph with negative weights
239239
cat("Example 2: Graph with negative weights\n")

0 commit comments

Comments
 (0)