Keep the top-k highest-priority items from a stream in O(k) space. Zero runtime dependencies.
python data-structure priority priority-queue min-heap streaming-data python-package online-algorithm top-k-element top-k-items max-priority
-
Updated
Sep 19, 2026 - Python