Class MedianStream
Keeps median of given stream An online algorithm
Inherited Members
Namespace: Advanced.Algorithms.Numerical
Assembly: Advanced.Algorithms.dll
Syntax
public class MedianStream
Methods
Add(Int32)
Add a new item to stream
Declaration
public void Add(int newValue)
Parameters
Type | Name | Description |
---|---|---|
Int32 | newValue |
GetMedian()
Returns the current median
Declaration
public int GetMedian()
Returns
Type | Description |
---|---|
Int32 |