1820. Maximum Number of Accepted Invitations
https://leetcode.com/problems/maximum-number-of-accepted-invitations
Description
There are m
boys and n
girls in a class attending an upcoming party.
You are given an m x n
integer matrix grid
, where grid[i][j]
equals 0
or 1
. If grid[i][j] == 1
, then that means the ith
boy can invite the jth
girl to the party. A boy can invite at most one girl, and a girl can accept at most one invitation from a boy.
Return the maximum possible number of accepted invitations.
Example 1:
Example 2:
Constraints:
grid.length == m
grid[i].length == n
1 <= m, n <= 200
grid[i][j]
is either0
or1
.
ac
Previous1819. Number of Different Subsequences GCDsNext1821. Find Customers With Positive Revenue this Year
Last updated