This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int m, n; | |
boolean[][] graph; | |
boolean seen[]; | |
int matchL[]; //What left vertex i is matched to (or -1 if unmatched) | |
int matchR[]; //What right vertex j is matched to (or -1 if unmatched) | |
int maximumMatching() { | |
//Read input and populate graph[][] | |
//Set m to be the size of L, n to be the size of R | |
Arrays.fill(matchL, -1); |