# How to populate a hash map with the frequency of different characters in a string def tracker(string): count = {} for i in range(len(string)): #Storing frequency of characters for length of array count[string[i]] = count.get(string[i], 0) + 1