# Majority Event in Stream

> One event type is drowning out the rest. Find it without a frequency table.

Canonical URL: <https://datadriven.io/problems/majority_event_in_stream>

Domain: Python · Difficulty: medium · Seniority: L4

## Problem

Given a list of event type strings, return the event type that appears strictly more than half the time, or None if no such element exists. Use the Boyer-Moore majority vote algorithm for O(1) memory.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/majority_event_in_stream)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.