Skip to content
RED SAG Skills
hard20 pts · first answer countsstacks-and-queues

Median of a sliding window

You need the median of every window of size k in a long array. The two-heap method works, but items must leave the window. What is a common way to remove them?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions