HF RL Explorer

Median-Heap Implementation Task

Median-Heap Implementation Task: a task in Terminal-Lego-15k (Harbor dataset). Implement a Median-heap data structure that efficiently keeps track of the median of a dynamic set of integers. Unlike a traditional max-heap or min-heap, a median-heap should always provide O(1) access to the median…

The task

Implement a **Median-heap** data structure that efficiently keeps track of the median of a dynamic set of integers. Unlike a traditional max-heap or min-heap, a median-heap should always provide O(1) access to the median element.

Part of PrimeIntellect/Terminal-Lego-15k.