Basic Idea of Using Breadth-first search (BFS) in Flood-Fill Algorithm
Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior