Computer Science, asked by rajeshmond1858, 11 months ago

Difference between highest and least frequencies in an array

Answers

Answered by Anonymous
0

Answer:

Given an array, find the difference between highest occurrence and least occurrence of any number in an array

Examples:

Input : arr[] = [7, 8, 4, 5, 4, 1, 1, 7, 7, 2, 5]

Output : 2

Lowest occurring element (5) occurs once.

Highest occurring element (1 or 7) occurs 3 times

Input : arr[] = [1, 1, 1, 3, 3, 3]

Output : 0

#followme

#markasbrainlist

...

Similar questions