Skip to content

OccurrenceCounter is generic class that serves the purpose of continuously counting the number of occurrences of item kinds. The class is able to return the top and bottom items at any moment; top being the items with the highest occurrence count, bottom with the lowest.

License

Notifications You must be signed in to change notification settings

benedeki/OccurrenceCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Occurrence Counter

OccurrenceCounter is generic class that serves the purpose of continuously counting the number of occurrences of item kinds. The class is able to return the top and bottom items at any moment; top being the items with the highest occurrence count, bottom with the lowest.

The adding of an item to the counter is done in constant time, therefore adding a sequence of items is cost linear time in the context of sequence length. Getting the bottom and top items is effectively equal to creating a sequence of the given size.

About

OccurrenceCounter is generic class that serves the purpose of continuously counting the number of occurrences of item kinds. The class is able to return the top and bottom items at any moment; top being the items with the highest occurrence count, bottom with the lowest.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages