Available question text
Given nums and queries where each query marks a specified index (if not already) and then marks up to k currently-unmarked elements with the smallest values (ties broken by index), return the sum of unmarked elements after each query. The core challenge is efficiently maintaining the dynamic set of unmarked elements ordered by (value, index) and updating the total sum across up to 1e5 operations.
Related questions
Continue with questions that share topics or the same question type.
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 3080. Mark Elements on Array by Performing Queries
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source