strengths.mat.
a. Count the number of soldiers (1's) in the row using a linear search.
b. Append a tuple to strengths containing the count and the row index.strengths list by the soldier count, using the row index to break ties.k elements of the sorted strengths list.