Empty Seats
seats is a 2-D array describing a theater: 1 means the seat is taken and 0 means it is empty. Return a list with the number of empty seats in each row.
Example 1
seats [[1,0,0],[1,1,1],[0,0,0]]
returns [2,0,3]
Row 0 has two empty seats, row 1 has none, row 2 has three.
Constraints
1 <= rows, columns <= 10- Every value is 0 or 1
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Fill MissingEasy
- First Day Over LimitEasy
- Full ColumnsEasy
- Good ColumnsEasy
- Group MaximumsEasy
- Is SortedEasy
- Is SymmetricEasy
- Largest GapEasy