Expand the pond

Unable to approach the question.
Pls help

@aman_ishan You have to try and Mark each dry land to wet land and calculate the max area you could achieve using dfs.