MGLISD Problem - Overnite Coding

Can anyone help me find my bug ?
soln

Your code fails in the following case:
1 3
.#.

“He decided to cover maximum number of cells only via Special Water cells which are adjacent to each other, ie, share atleast one corner”. So you can’t visit both cells travelling only through Special Water.

1 Like

Oops! I misread the question.
My solution prints the count of cells only.
Thanks for the clarification.