Pregunta de entrevista de Sears

Given an array. Find the frequency of elements in array.