You are given a nums. You begin with a score of
Repeat the following process until the matrix is empty:
From each row, select and remove the element with the highest value. If there is a tie, any one of the highest elements may be removed.
Determine the maximum value among all elements removed in this step.
Add this maximum value to your score.
Return the final score after all elements are removed from nums.
Constraints:
nums.length
nums[i].length
nums[i][j]
You are given a nums. You begin with a score of
Repeat the following process until the matrix is empty:
From each row, select and remove the element with the highest value. If there is a tie, any one of the highest elements may be removed.
Determine the maximum value among all elements removed in this step.
Add this maximum value to your score.
Return the final score after all elements are removed from nums.
Constraints:
nums.length
nums[i].length
nums[i][j]