May 2018
Intermediate to advanced
328 pages
8h 15m
English
Write a function that, given a range, returns the most frequent element and the number of times it appears in the range. If more than one element appears the same maximum number of times then the function should return all the elements. For instance, for the range {1,1,3,5,8,13,3,5,8,8,5}, it should return {5, 3} and {8, 3}.
Read now
Unlock full access