Prepping for the 2027 recruiting cycle? Use code 2027RC for 10% off, valid until July 31st! Oh, and check out our members-only recruitment services.

Logo

Bad users tracker

What this preview is

Bad users tracker is a easy quant coding problem on language knowledge in Cpp.

Difficulty
Easy
Topic
Language Knowledge
Discipline
Quant development
Language
Cpp

What this C++ data-structure coding problem tests

This is an easy coding problem that asks you to implement a time-windowed request tracker in C++. It probes whether you can manage a sliding window of events, maintain aggregate counts per user, and crucially, evict stale data so memory does not grow without bound.

The core challenge is not algorithmic difficulty but rather careful bookkeeping: you must track requests by timestamp, count them within a 300-second window, identify users exceeding a threshold, and clean up expired entries as time advances. Strong solutions choose a data structure (such as a map of queues or a deque per user) that makes both insertion and expiration efficient and straightforward to reason about.

  • Sliding-window time-series tracking
  • Per-entity counters and aggregation
  • Lazy vs. eager garbage collection of stale state
  • Trade-offs between query time and memory overhead

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.