In Time Tec Interview Question

find frequency of each element from array.