tags of tag numbers attached to photos. The frequency of a tag is how many times it appears in the list.
Find the highest frequency and return how many elements of the list belong to tags with that frequency.tags=[5, 7, 5, 9, 7, 2] → 4
5 and 7 are the most frequent, twice each, which makes 4 elements together.
tags=[3, 3, 3, 8] → 3
Only 3 occurs three times, so the answer is 3.
tags=[4, 1, 6] → 3
Every value occurs once, so all three elements count.
tags=[5, 7, 5, 9, 7, 2]
4
Run checks the first 3 tests in your browser. Submit checks all 119 tests on the server, hidden ones included.