You’re joining a fintech team that serves 5–10 million daily active users and must keep P99 API latency under 50ms for balance checks and fraud rules. Many hot paths rely on in-memory key/value lookups (e.g., mapping user_id -> risk_profile, card_token -> account_id). Choosing and tuning the right data structure directly impacts latency, CPU cost, and tail behavior under traffic spikes.
Explain the concept of a hash table (hash map/dictionary) and how its core operations work:
Operations & expected performance
Under-the-hood mechanics
Maintaining performance at scale
Answer at the level expected of a mid-level engineer: describe the backing array + hashing, collision handling, resizing strategy, and complexity. You don’t need to reproduce a production-grade implementation, but you should be able to sketch how you’d build a basic one and explain the trade-offs clearly.