mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-15 01:40:49 +08:00
Fix 2D array passed to Arrays.fill() (#2010)
Arrays.fill() accepts single dimensional arrays, so fill one row at a time. Fixes TheAlgorithms/Java#2009
This commit is contained in:
@ -14,7 +14,7 @@ public class FloydWarshall {
|
||||
[numberofvertices
|
||||
+ 1]; // stores the value of distance from all the possible path form the source
|
||||
// vertex to destination vertex
|
||||
Arrays.fill(DistanceMatrix, 0);
|
||||
// The matrix is initialized with 0's by default
|
||||
this.numberofvertices = numberofvertices;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user