Search code snippets, questions, articles...

Microsoft Fill Paint - Bloomberg - Port Interactive Analytics - Full Stack - 12/6/21

// 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
 * 
*/
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Was this helpful?
0 Comments