You are given a 2D matrix of size m x n containing land cells (1s) and water cells (0s).
A land cell is an enclave if it is impossible to walk off the edge of the grid by stepping only 4-directionally on land cells. Find the total count of such enclaved land cells in the grid.
Visualizer will appear here