DEV Community

Discussion on: Practicing recursion with the flood fill algorithm

Collapse
 
clandau profile image
Courtney

Thanks.
I'm not visiting any point more than once, I've confirmed this.

You are right that I am mutating the original array, I see your point, and know that it should be avoided. Not sure that it's necessary here though. Returning the array again from the function is not needed as I can just log the original again.