DIY: Flood Fill
Explore how to implement the flood fill algorithm for modifying images represented as 2D arrays. Understand how to update a starting pixel and all connected pixels of the same color with a new color, and practice coding this solution in Elixir. This lesson helps develop skills important for solving network and image-related coding interview problems.
We'll cover the following...
We'll cover the following...
Problem statement
An image is represented by a 2-D array of integers, each integer represents a pixel value of the image between 0 and 65535.
Given a coordinate (sr, sc) representing the flood fill’s starting pixel (row and column) and a pixel value new_color, flood fill ...