11138 - Nuts and Bolts
Solution Description : Graph (Maximum bipartite matching or Maximum Matching (DFS)) problem This is completely a maximum bipartite matching problem. We want to maximum match bolts to a nuts, with given adjacency list. You can see the "Hopcroft-Karp" algorithm for Maximum bipartite matching. |
||||||||||