Search
⌘K

Leetcode 2991. Top Three Wineries

Given a dataset of wineries and their performance metrics (e.g., ratings or sales), return the top three wineries per group (such as region or year) ranked by an aggregate metric, handling ties deterministically. The challenge is computing per-group top‑k efficiently—typically via grouping and aggregation plus per-group ranking (window functions or heaps/selection algorithms).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.