Question: give the code in c + + , dont copy paste the code from anywhere,In a flooding scenario, a grid of size m n is
give the code in cdont copy paste the code from anywhere,In a flooding scenario, a grid of size is used to represent a region
affected by floods, with denoting flooded areas and for nonflooded areas that are
safe. The situation becomes critical when a region marked is surrounded by on all
four cardinal directions up down, left, right indicating that floodwaters fully encircle
the nonflooded area. These areas cannot be saved. The task is to update the grid to
show the final configuration of the flooded areas and those that remain dry. A region
of comprises all the that are adjacent to another in any of the four cardinal
directions. Constraints:
board. length
board i length
boardij is F or N
Input:
Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
