Search
⌘K
Leetcode 3092. Most Frequent IDs
Given a sequence of ID updates where each step adds or removes a given number of copies of an ID, maintain the dynamic multiset of ID counts and return the current maximum count (or 0 if empty) after each step. The challenge is to efficiently track per-ID frequencies and support fast queries for the highest frequency across up to 1e5 updates.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.