Find the number that appears (or repeated) the most number of times in the array
You are given a list of 'N' numbers with the following conditions:
1) The list is not sorted. It is in random order
2) Some of the numbers could be repeating multiple times.
3) You need to find the number that appears the most number of times in the array
In other words, print the number that has the highest frequency in the list.
4) If 2 numbers have the same frequency, the greatest of them should be printed
Write a program to find the number that is repeated the most number of times in the
array
The input file will contain the following:
Line 1 Number of elements in the list (N). 1 <= N = 10000
Line 2 The list of numbers separated by spaces
Sample input 1
Sample output 1
Answers
Answered by
0
pls mark brainliest cause it took me a lot of time
Attachments:
Similar questions