This PR aims to add an algorithm to identify the top k most frequent strings given a provided string list of elements.
To do this, the algorithm is using a max-heap implementation already existing in this repository.
Time complexity is O(n), where n is the number of words:
O(n) for building the max-heap
k*O(logn) for extracting the k most frequent strings
This PR aims to add an algorithm to identify the top
k
most frequent strings given a provided string list of elements. To do this, the algorithm is using a max-heap implementation already existing in this repository.Time complexity is
O(n)
, where n is the number of words:O(n)
for building the max-heapk*O(logn)
for extracting the k most frequent strings