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

More By Author:

Check out these other kata created by KK20994

Stats:

CreatedSep 23, 2014
PublishedSep 23, 2014
Warriors Trained29230
Total Skips2767
Total Code Submissions97443
Total Times Completed17605
JavaScript Completions7333
Haskell Completions582
Clojure Completions458
C# Completions1157
Python Completions6518
F# Completions100
Go Completions1107
Ruby Completions401
C Completions229
Groovy Completions12
Total Stars446
% of votes with a positive feedback rating92% of 1919
Total "Very Satisfied" Votes1657
Total "Somewhat Satisfied" Votes234
Total "Not Satisfied" Votes28
Ad
Contributors
  • KK20994 Avatar
  • jhoffner Avatar
  • xcthulhu Avatar
  • guumaster Avatar
  • surtich Avatar
  • Unnamed Avatar
  • anter69 Avatar
  • Chrono79 Avatar
  • user5036852 Avatar
  • hobovsky Avatar
  • testfirstcoder Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • MikChan Avatar
  • FranzMartyn Avatar
  • cwps Avatar
  • saudiGuy Avatar
Ad