Data structure that supports efficient memory and performence operations
- Adding a number to the structure
- Calculating the median
The first operation is supported in O(logN) time. (Amortized time, because of the resizing of the inner collection) The second operation is done in O(1) time.
Criteria:
- Well-structured code. Easy to read and understand
- There are automatic tests.
- Hosted on github.com (or bitbucket.com, or gitlab.com).
- The operations to add a number and calculate the median have a minimum time complexity.