Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Is Graph Bipartite?
Bookmark
Input
Not bipartite
Bipartite (Square)
Not bipartite (Triangle)
Bipartite (Hexagon)
Custom
graph
=
[[1,2,3],[0,2],[0,1,3],[0,2]]
0
1
2
3
(empty)
Call Stack
Colors:
[0]
-
[1]
-
[2]
-
[3]
-
Legend:
Uncolored
Color A (0)
Color B (1)
Conflict
algo
master
.
io
Step:
Start checking if graph with 4 nodes is bipartite using DFS with 2-coloring
0 / 15
Input
Not bipartite
Bipartite (Square)
Not bipartite (Triangle)
Bipartite (Hexagon)
Custom
graph
=
[[1,2,3],[0,2],[0,1,3],[0,2]]
0 / 15
0
1
2
3
(empty)
Call Stack
Colors:
[0]
-
[1]
-
[2]
-
[3]
-
Legend:
Uncolored
Color A (0)
Color B (1)
Conflict
algo
master
.
io
Step:
Start checking if graph with 4 nodes is bipartite using DFS with 2-coloring