The Loudest Voice
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
An event stream pushes one event-type string per record, and during an incident a single type can swamp the feed. Given a list of event type strings `events`, return the type that appears strictly more than half the time (more than `len(events) // 2` occurrences), or `None` when no type clears that bar. The feed can hold up to 500000 records and you cannot afford to keep a separate count for every distinct type, so solve it in O(1) extra space.
Summary
One event type is drowning out the rest. Find it.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision