Maintain the Median of a Number Stream
Company: ByteDance
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
Overview: Implement a stream data structure that supports integer insertions and exact median queries across up to 200,000 operations. Preserve duplicates and negatives, and return the arithmetic mean of the two middle values for even-sized streams.
Read the full ByteDance Software Engineer interview experience this question came from