We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentecdcebb commitf405ddeCopy full SHA for f405dde
Recursive/FloodFill.js
@@ -105,7 +105,7 @@ function breadthFirstFill(
105
106
if(rgbData[currentLocation[0]][currentLocation[1]]===targetColor){
107
rgbData[currentLocation[0]][currentLocation[1]]=replacementColor
108
-for(constneighborLocationofneighbors(currentLocation)){
+for(constneighborLocationofneighbors(rgbData,currentLocation)){
109
queue.push(neighborLocation)
110
}
111
@@ -122,7 +122,7 @@ function breadthFirstFill(
122
functiondepthFirstFill(rgbData,location,targetColor,replacementColor){
123
if(rgbData[location[0]][location[1]]===targetColor){
124
rgbData[location[0]][location[1]]=replacementColor
125
126
depthFirstFill(rgbData,neighborLocation,targetColor,replacementColor)
127
128