Another one was,
We are given an N × M grid representing a district, where 0 denotes a healthy area and 1 denotes an infected area. Connected infected cells form an infected region. Each day, we can build walls around only one infected region to stop it from spreading, while all other uncontained infected regions spread to their adjacent healthy cells. Once we build a wall, it cannot be removed. Our objective is to determine the minimum number of walls required to completely contain the virus while ensuring that the maximum number of healthy cells remain uninfected. If there are multiple ways to achieve this, we choose the one that uses the fewest walls. Finally, we output the minimum number of walls required to contain the virus completely
.