javascript
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
*
*/
Was this helpful?
Similar Posts
- Recommendations - Bloomberg - Port Interactive Analytics - Full Stack - 11/8/21
- Valid Dictonary String - Bloomberg - Port Interactive Analytics - Full Stack - 11/8/21
- Sort Tree - Bloomberg - Port Interactive Analytics - Front End - 12/6/21
- Van Ecks Sequence - Bloomberg - Asset Management AIM - Full Stack - 11/5/21
- Flexible UI Component - Bloomberg - Asset Management AIM - Full Stack - 12/6/21
- 2D Array Path - C3 AI - CRM - Full Stack - 11/11/21
- Compressed String with Sort - C3 AI - CRM - Full Stack - 11/11/21