Added a class to calculate the fequency of strings in a collection in linear time