def countFreq(arr):
visited = [False for _ in range(len(arr))]
for i in range(len(arr)):
count = 1
if visited[i]:
continue
for j in range(i+1, len(arr)):
if arr[i] == arr[j]:
count += 1
visited[j] = True
visited[i] = True
print(f'{arr[i]} : {count}')
# Time complexity: O(n * n)
# space complexity: O(n)