Skip to content

Instantly share code, notes, and snippets.

View Rohith1221's full-sized avatar
:shipit:
learning

Rohith1221

:shipit:
learning
View GitHub Profile
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
@PurpleBooth
PurpleBooth / README-Template.md
Last active December 3, 2025 00:19
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

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.

Prerequisites