Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Find Largest Value in Each Tree Row
Coding
- Delete Leaves With a Given Value
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Smallest Missing Genetic Value in Each Subtree
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2500. Delete Greatest Value in Each Row
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source