[LeetCode] Find a Good Subset of the Matrix

1 · · June 10, 2023, 3:11 p.m.
2732. Find a Good Subset of the Matrix You are given a 0-indexed m x n binary matrix grid. Let us call a non-empty subset of rows good if the sum of each column of the subset is at most half of the length of the subset. More formally, if the length of the chosen subset of rows is k, then the sum of each column should be at most floor(k / 2). Return an integer array that contains row indices of a good subset sorted in ascending order. If there are multiple good subsets, you can return any of the...