MedianHeap
MedianHeap is a Rust crate that provides a data structure for calculating the median of a collection of values in constant time. It utilizes two binary heaps to store values efficiently and offers flexibility in calculating the median by allowing different strategies through user-defined traits.
Installation
Add the following line to your Cargo.toml
file:
[]
= "0.1.0"
Usage
To use MedianHeap
, add this to your code:
use ;
;
License
This project is licensed under the MIT License - see the LICENSE file for details.