Available question text
Given an array where you can repeatedly remove either two or three equal elements, compute the minimum number of such operations to delete all elements (or return -1 if impossible). This reduces to counting frequencies of each value and, for each frequency, finding the minimum number of 2- and 3-sized batches (impossible if any frequency is 1).
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 2870. Minimum Number of Operations to Make Array Empty
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source