grade distribution +***** +******** +********** +***** +**+----+----+----+----+----+----+----+--- implementation to implement the histogram adtwe must select an appropriate data structure for storing the categories and corresponding frequency counts there are several different structures and approaches that can be usedbut the map adt provides an ideal solution since it already stores key/value mappings and allows for full implementation of the histogram adt to use mapthe categories can be stored in the key part of the key/value pairs and counter (integer valuecan be stored in the value part when category counter is incrementedthe entry is located by its key and the corresponding value can be incremented and stored back into the entry the implementation of the histogram adt using an instance of the hash table version of the map adt as the underlying structure is provided in listing listing the maphist py module implementation of the histogram adt using hash map from hashmap import hashmap class histogram creates histogram containing the given categories def __init__selfcatseq )self _freqcounts hashmap(for cat in catseq self _freqcounts addcat returns the frequency count for the given category def getcountselfcategory )assert category in self _freqcounts"invalid histogram category return self _freqcounts valueofcategory (listing continued