Leetcode 1127. User Purchase Platform
Design a system that processes a stream of user purchase events and answers online analytics queries such as total spend or purchase count per user over time ranges and top‑K purchasers. The core challenge is supporting high‑frequency updates and efficient range/top‑K queries, so expect to use time‑indexed aggregation and dynamic ranking structures (e.g., sliding‑window aggregation, Fenwick/segment trees, heaps or ordered maps) to meet tight time/space constraints.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.