~/boss / rival-clans
Bipartite check (two-coloring with BFS)
The Clan War
Split the monsters into two clans with no enemies inside. Or prove it can't be done.
Loading the fight…
How to beat it
Paint any monster red. Every enemy of a red monster must be blue, and every enemy of a blue one red: spread the colors with a queue, one monster at a time. Find two enemies with the same color? No split exists.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/is-graph-bipartite there. Sign in with your email to keep your progress on every device.