Skip to content

Commit 9f6e906

Browse files
feat: solve Striver SDE Sheet problem 234 - Is Graph Bipartite?
1 parent 2bc240a commit 9f6e906

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Is Graph Bipartite? (Medium)
2+
3+
**Problem ID:** 785
4+
**Problem Number:** 234
5+
**Link:** https://leetcode.com/problems/is-graph-bipartite
6+
7+
## Problem Statement
8+
9+
There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1. You are given a 2D array graph, where graph[u] is an array of nodes that node u is adjacent to. More formally, for each v in graph[u], there is an undirected edge between node u and node v. The graph has the following properties:
10+
11+
12+
There are no self-edges (graph[u] does not contain u).
13+
There are no parallel edges (graph[u] does not contain duplicate values).
14+
If v is in graph[u], then u is in graph[v] (...
15+
16+
## Solutions
17+
18+
- Python: `solution.py`
19+
- Java: `solution.java`
20+
- JavaScript: `solution.js`
21+
22+
**Note:** Solutions need to be implemented.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Solution for Is Graph Bipartite?
2+
// Problem ID: 785
3+
// Link: https://leetcode.com/problems/is-graph-bipartite
4+
5+
class Solution {
6+
// TODO: Implement solution
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Solution for Is Graph Bipartite?
2+
// Problem ID: 785
3+
// Link: https://leetcode.com/problems/is-graph-bipartite
4+
5+
/**
6+
* TODO: Implement solution
7+
*/
8+
var solve = function() {
9+
// Implementation needed
10+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Solution for Is Graph Bipartite?
2+
# Problem ID: 785
3+
# Link: https://leetcode.com/problems/is-graph-bipartite
4+
5+
class Solution:
6+
def solve(self):
7+
# TODO: Implement solution
8+
pass

0 commit comments

Comments
 (0)