Skip to content

Instantly share code, notes, and snippets.

View rahulsonone1234's full-sized avatar
🌍
Working For The Betterment Of The World

Rahul Sonone rahulsonone1234

🌍
Working For The Betterment Of The World
View GitHub Profile
class Solution {
bool isbipartite(vector<vector<int>>&adj, int N, int node,vector<int>&color)
{
queue<int>q;
q.push(node);
color[node]=1;
while(!q.empty())
{
int curr=q.front();
q.pop();