Loading...

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
senior, staff

Problem

A matching platform needs to verify that its user-interest graph can be split into two groups with no intra-group connections - a property required for certain matching algorithms. Given an adjacency list as a list of lists, write a function that returns True if the graph is bipartite.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.