---
title: "Amazon interview question: Implement FloodFill algorithm"
url: https://daily.dev/posts/amazon-interview-question-implement-floodfill-algorithm-pbiznhdhe
source_url: https://www.youtube.com/watch?v=kYqMC3dXC0Q
type: video:youtube
source: "Tech Dummies - Narendra L"
published: 2026-05-31T07:49:18.458Z
updated: 2026-05-31T09:22:49.571Z
tags: ["python", "interview-questions"]
reading_time: 14
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon interview question: Implement FloodFill algorithm

**[Tech Dummies - Narendra L](https://daily.dev/sources/techdummies)** · 14 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of the Flood Fill algorithm, a classic coding interview question asked at companies like Amazon and Facebook. The algorithm simulates the MS Paint bucket tool by traversing a 2D matrix using DFS to find all connected cells of the same color and replacing them with a new color. The explanation covers the step-by-step DFS traversal using a stack and visited set, followed by a Python implementation demonstrating the algorithm on a sample matrix.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=kYqMC3dXC0Q>

## Similar posts on daily.dev

- [Floodfill algorithm in Python](https://daily.dev/posts/floodfill-algorithm-in-python-wk9jc6w7a) · Planet Python · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#interview-questions](https://daily.dev/tags/interview-questions)

[View this post on daily.dev](https://daily.dev/posts/amazon-interview-question-implement-floodfill-algorithm-pbiznhdhe)
