Leetcode 2500. Delete Greatest Value in Each Row
Given an m×n matrix, repeatedly remove the greatest element from each row and add the maximum of those removed elements to a running total until no columns remain; return the final sum. Observing that sorting each row lets you compute the answer by summing column-wise maxima across the sorted rows yields an efficient solution.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.