Sobes.tech
Junior — Senior

Filling a connected region in a 2D image

livecode

Task condition

Given an image represented as a two-dimensional array of numbers, where each number indicates the color of a pixel. It is necessary to implement a program that replaces the color of a selected region with a new one, mimicking the 'Fill' tool in graphic editors.