Popularity Tracker with Constant-Time Most Popular

Asked at Atlassian · Coding Questions · Difficulty: Hard · Last asked Apr 21, 2026

Build a popularity tracker for content items. Each item has an integer score that users raise and lower one step at a time, and the tracker must report which item currently has the highest score.

Loading the problem…