You are given an m x n binary matrix mat of 1s (soldiers) and 0s (civilians). In every row, all the soldiers stand in front of the civilians: every 1 appears to the left of every 0. Row i is weaker than row j if row i has fewer soldiers than row j, or they have the same number of soldiers and i < j. Return the indices of the k weakest rows, ordered from weakest to strongest.
You are given an m x n binary matrix mat of 1s (soldiers) and 0s (civilians). In every row, all the soldiers stand in front of the civilians: every 1 appears to the left of every 0. Row i is weaker than row j if row i has fewer soldiers than row j, or they have the same number of soldiers and i < j. Return the indices of the k weakest rows, ordered from weakest to strongest.