DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Firehose

A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
Python
Difficulty
medium
Seniority
L4

Interview Prompt

You're rolling up a stream of metric events, each carrying a numeric `timestamp` and a numeric `value`, into fixed-width time windows of size `bucket_width`, where a window spans `[bucket_start, bucket_start + bucket_width)`. Collapse the events so every window holding at least one of them reports its event `count`, the `total` of its values, and the `bucket_start` it begins at. The events arrive in no particular order, any window that caught nothing is left out entirely, and the windows come back from earliest to latest.

Summary

A stream arrives out of order. Roll it up, one time window at a time.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your python solution with real code execution
  4. Get instant feedback and a hire/no-hire decision

Related

  • All Mock Interviews
  • Practice Mode (untimed)
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Practice Problems
  • Daily Challenge