
Solution to Leetcode’s Flood Fill - chunks
https://medium.com/@codechunkers/solution-to-leetcodes-flood-fill-a84b3917ee1b
======
anonymoushn
You probably want to use BFS. For a large rectangular region starting in the
bottom right, this solution uses 1 stack frame per cell in the region.

------
mark-r
Yes, this is an easy problem to solve with recursion. But with any realistic
size image, you are going to blow up your stack as the recursion depth grows
rapidly.

~~~
dominotw
you can use the same soln but maintain your own stack instead . equally easy.

------
spuz
Given what I'm used to seeing on HN - i.e. long detailed deep dives into some
clever technical solution to a problem I actually laughed out loud when the
article finishes after the very first attempt at a solution with "Thank you
very much for reading. Please leave a comment or suggestion."

------
roshni_h
Morons like @OP .. self promoting their medium blogs at expense of HN readers
..

------
joezydeco
This was a question on my AP Computer Science exam, a long long time ago.

------
chunks
This is really an interesting easy question on Leetcode. YOU WILL LEARN A LOT

------
dominotw
weird to see leetcode solns on HN frontpage

