Problem link>> https://leetcode.com/problems/as-far-from-land-as-possible/
My solution is giving TLE on one last test case can u help me to optimize my solution
my code >> https://ide.codingblocks.com/s/486434
I know can use DP but most of the people did it with just BFS so I thought if something is wrong in this ??