Bipartite Graph Leetcode Questions