Write a code that returns the 5 most common occuring strings in a list for example list would be something like "a" "b" "c" "f" "a" "d" "e" "f" "b" "f" "f" and the function would return f 4 a 2 b 2 c 1 d 1 I know the Count sort method . Just wanted to know is there any shorter method as count sort uses lots of space . And we want only the 5 most occurring strings .
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.