Walmart Global Tech interview question

frequency of characters in array