Goal
Goal: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Write a Python CLI tool that reads a large file of numbers (one per line), maintains a fixed-size sliding window of the last N lines seen, and continuously outputs an approximate top-K and approximate median of…
The task
Write a Python CLI tool that reads a large file of numbers (one per line), maintains a **fixed-size sliding window** of the last `N` lines seen, and continuously outputs an **approximate top-K** and **approximate median** of the current window using the **Count-Min Sketch** algorithm. Output is written to a CSV file.
Part of ai-and/termgrade-environments.