type Element struct { Value string Count int }
type Samples []*Element
func (sm Samples) Len() int
func (sm Samples) Less(i, j int) bool
func (sm Samples) Swap(i, j int)
type Stream struct {
// contains filtered or unexported fields
}
func New(k int) *Stream
func (s *Stream) Insert(x string)
func (s *Stream) Merge(sm Samples)
func (s *Stream) Query() Samples