Pergunta de entrevista da empresa Amazon

write a method which takes x/y coordinates for a point for a graphics program and implement a bucket-fill (change all the surrounding pixels of the same color to the new color)

Resposta da entrevista

Sigiloso

20 de ago. de 2010

I wasn't expecting something like this, but I came up with a recursive algorithm which took a point, changed the color if it matched, and called the same method (recursively) for all neighboring points.