When doing practice problems, I often times need to build a dict with keys as elements from an array and values as frequencies in which they appear. I usually do something