6 kyu
Highest Rank Number in an Array
7,333 of 17,605KK20994
Description:
Complete the method which returns the number which is most frequent in the given input array. If there is a tie for most frequent number, return the largest number among them.
Note: no empty arrays will be given.
Examples
[12, 10, 8, 12, 7, 6, 4, 10, 12] --> 12
[12, 10, 8, 12, 7, 6, 4, 10, 12, 10] --> 12
[12, 10, 8, 8, 3, 3, 3, 3, 2, 4, 10, 12, 10] --> 3
Arrays
Fundamentals
Similar Kata:
Stats:
Created | Sep 23, 2014 |
Published | Sep 23, 2014 |
Warriors Trained | 29230 |
Total Skips | 2767 |
Total Code Submissions | 97443 |
Total Times Completed | 17605 |
JavaScript Completions | 7333 |
Haskell Completions | 582 |
Clojure Completions | 458 |
C# Completions | 1157 |
Python Completions | 6518 |
F# Completions | 100 |
Go Completions | 1107 |
Ruby Completions | 401 |
C Completions | 229 |
Groovy Completions | 12 |
Total Stars | 446 |
% of votes with a positive feedback rating | 92% of 1919 |
Total "Very Satisfied" Votes | 1657 |
Total "Somewhat Satisfied" Votes | 234 |
Total "Not Satisfied" Votes | 28 |