Bipartite matching maximum
Your task
You have n_left workers (0..n_left-1) and n_right tasks (0..n_right-1). Each edge [u, v] means worker u can do task v. Each worker does at most one task and each task is done by at most one worker. Return the maximum number of (worker, task) assignments possible. Constraints: 1 <= n_left, n_right <= 500.
Examples
max_bipartite_matching(n_left: int, n_right: int, edges: list[list[int]]) -> intExample 1
Input
max_bipartite_matching(2, 2, [[0, 0], [0, 1], [1, 0]])Output
2