The Bipartite Test
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L5
Problem
Given a graph as an adjacency list (graph[i] is the list of neighbors of node i), return True if the graph is bipartite (2-colorable).
Summary
Can this crowd be split into two perfectly separated groups?
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.