Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit67cb97d

Browse files
authored
Fix 2D array passed to Arrays.fill() (TheAlgorithms#2010)
Arrays.fill() accepts single dimensional arrays, so fill one row at a time.FixesTheAlgorithms#2009
1 parent2163204 commit67cb97d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎DataStructures/Graphs/FloydWarshall.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public FloydWarshall(int numberofvertices) {
1414
[numberofvertices
1515
+1];// stores the value of distance from all the possible path form the source
1616
// vertex to destination vertex
17-
Arrays.fill(DistanceMatrix,0);
17+
// The matrix is initialized with 0's by default
1818
this.numberofvertices =numberofvertices;
1919
}
2020

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp