Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func (*Counter) MostCommon ¶
func (c *Counter) MostCommon(n int) (items []CounterItem)
TODO: is it possible to get the most common without popping and pushing? O(n log k)
type CounterItem ¶
type CounterItem struct { Value interface{} Count int }
Click to show internal directories.
Click to hide internal directories.