// Start typing here
// image: 2d array iof numbers, grayscale 0 - 10
// blank canvas, fills whole canvas
// function floodfill(image, xy, xz, tc)
// BFS, DFS to search
// Add nodes/coordinates arounda pixel (edge case)
// 0 0 0
// 1 1 0 // This shouldn't get filled
// 0 0 1
//
/**
* 0 0 0 0 0
1 1 1 0 0
0 0 0 1 0
1 1 1 1 0
0 0 0 0 0
(1,2) --> (1,2), (0,2), (2,2)
0 0 0 0 0
1 1 1 0 0
3 3 3 1 0
1 1 1 1 0
0 0 0 0 0
*
*/
0 Comments