One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| class Solution { | |
| void mark_current_island(vector<vector<char>> &matrix,int x,int y,int r,int c) | |
| { | |
| if(x<0 || x>=r || y<0 || y>=c || matrix[x][y]!='1') //Boundary case for matrix | |
| return; | |
| //Mark current cell as visited | |
| matrix[x][y] = '2'; | |
| //Make recursive call in all 4 adjacent directions |