Skip to content

Commit 79d40fb

Browse files
fix: make dist constant in print
1 parent 334fb7d commit 79d40fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/floyd_warshall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Graph {
3838
};
3939

4040
// Utility function to print distances
41-
void print(const std::vector<int> dist, int V) {
41+
void print(const std::vector<int>& dist, int V) {
4242
cout << "\nThe Distance matrix for Floyd - Warshall" << endl;
4343
for (int i = 0; i < V; i++) {
4444
for (int j = 0; j < V; j++) {

0 commit comments

Comments
 (0)