Frequency of each element of an array of small ranged values
Given an array where elements in small range. The maximum element in the array does not go beyond size of array. Find frequencies of elements. Examples: Input : arr[] = {3, 1, 2, 3, 4, 5, 4} Output: 1-->1 2-->1 3-->2 4-->2 5-->1 Input : arr[] = {1, 2, 2, 1, 2} Output: 1-->2 2-->