Find the 10 top most occurring strings in a huge array of Strings.
Since the array is huge, it is not possible to load it in memory completely. My idea is to parse the arrays one by one and put the strings in a hash table with string as key and occurrence count as value. But this would take too much memory.
Is there any other optimized solution? Given that we only care about top 10 keys.