Loading interview...

Majority Event in Stream

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
mid, senior

Scenario

An alerting system monitors event streams from microservices. If a single event type dominates the stream, it usually signals a cascading failure or a retry storm. The detector must run in constant extra memory because the stream can be massive.

Interview Prompt

Your pipeline receives a stream of event type strings. An event type is dominant if it appears more than half the time. Given a list of event type strings, return the dominant event type if one exists, or None otherwise. Memory matters: do not store a full frequency table.

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