Consider these strings (quotes for clarity, they're not part of the strings).
{"apple", "pear", "cherry", "apple", "pear", "apple", "banana"}
The array returned is:
{ "apple", "pear", "banana", "cherry" }
since the most frequently occurring string is
"apple" which occurs 3 times; the string
"pear"
occurs twice and the other strings each occur once so they are
returned in alphabetical order.
data will contain at most 500 elements
data will contain at most 50 characters,
all characters are lowercase.
data = {"apple", "pear", "cherry", "apple", "pear", "apple", "banana"}
Returns: {"apple", "pear", "banana", "cherry" }
This is the example given above.
data = {"a","b","c",d"}
Returns: {"a","b","c",d"}
data = {"d","c","b","a"}
Returns: {"a","b","c",d"}
data = {"a","a","a"}
Returns {"a"}
