Problem 432 · Hard

All O(1) Data Structure

Maintain counts of strings under increment and decrement, and report a key with the largest or smallest count in constant time. The visual groups keys into count buckets that rise and fall as keys change.

Open the interactive visualisation