rheineke / pymedian

Optimal running median data structure in Python
MIT License
0 stars 0 forks source link

ENH: Implementation based on counting sort #1

Open rheineke opened 7 years ago

rheineke commented 7 years ago

For integral types (or objects that support an integral hash?), a running median can be calculated using counting sort. It requires auxiliary storage space, and seems to run in linear time, but linear in keys rather than items (verify).

rheineke commented 7 years ago

http://stackoverflow.com/questions/10657503/find-running-median-from-a-stream-of-integers