python program to count number of occurrences of each element in the array in O ( n ) time and O ( 1 ) space
def findFrequencies ( ele , n ) : NEW_LINE INDENT freq = 1 NEW_LINE idx = 1 NEW_LINE element = ele [ 0 ] NEW_LINE while ( idx < n ) : NEW_LINE DEDENT