Minimum vertex cover
Your task
A bipartite graph has nL nodes on the left (0..nL-1) and nR nodes on the right (0..nR-1). edges is a list of [u, v] meaning left node u connects to right node v. Return the size of a minimum vertex cover: the fewest nodes (from either side) such that every edge has at least one endpoint chosen. Constraints: 1 <= nL, nR <= 200; edges may be empty or contain duplicates.
Examples
min_vertex_cover_bipartite(nL: int, nR: int, edges: list[list[int]]) -> intExample 1
Input
min_vertex_cover_bipartite(3, 3, [[0, 0], [0, 1], [1, 1], [2, 2]])Output
3