6 kyu
Highest Rank Number in an Array
7,362 of 17,697KK20994
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 | 29373 |
Total Skips | 2778 |
Total Code Submissions | 97863 |
Total Times Completed | 17697 |
JavaScript Completions | 7362 |
Haskell Completions | 584 |
Clojure Completions | 458 |
C# Completions | 1162 |
Python Completions | 6565 |
F# Completions | 100 |
Go Completions | 1112 |
Ruby Completions | 404 |
C Completions | 232 |
Groovy Completions | 13 |
Total Stars | 447 |
% of votes with a positive feedback rating | 92% of 1927 |
Total "Very Satisfied" Votes | 1665 |
Total "Somewhat Satisfied" Votes | 234 |
Total "Not Satisfied" Votes | 28 |