0 day streak
Anonymous · shared experience20 Nov 2026 · 11 views

Nutanix: Hit counter with bursty timestamps, fixed memory and concurrency

Interview question #Nutanix SDE 3 / Senior DSA / coding

Problem. Build a hit counter that records hits with timestamps and reports how many hits happened within a recent time window. This is the usual "hits in the last N seconds" style. The post does not restate the exact window or API.

Follow-ups, in order.

  1. Many hits can arrive with the same timestamp. How do you avoid storing each one? The candidate grouped hits by timestamp and kept one count per timestamp.
  2. Improve time and space complexity. The candidate moved to two fixed-length arrays, one for timestamps and one for counts, indexed by timestamp modulo the window size. Memory then stays bounded regardless of traffic.
  3. Make it thread-safe and fast under concurrent access. This part was discussed verbally rather than coded.

Format. A senior onsite round of about an hour: roughly 40 minutes of coding and 20 minutes on the resume.

What the interviewer cared about. Iterating from a simple design to a bounded-memory one, then reasoning about contention.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.