JavaScript program to count number of occurrences of each element in the array in O ( n ) time and O ( 1 ) space
function void findFrequencies ( ele ) { var freq = 1 ; var idx = 1 ; var element = ele [ 0 ] ; while ( idx < ele . length ) {