Doubt in flood fill

sir in this where is the use of dfs.
here is simple use of matrix.
Thanks

@Royal_Yashasvi
when u are calling the floodfill function there we are traversing in all the nbd cells of the given cell
which is a typical type of dfs

matrix is just being manipulated