7 kyu
Find Count of Most Frequent Item in an Array
1,244 of 13,719Fosna
Description:
Complete the function to find the count of the most frequent item of an array. You can assume that input is an array of integers. For an empty array return 0
Example
input array: [3, -1, -1, -1, 2, 3, -1, 3, -1, 2, 4, 9, 3]
ouptut: 5
The most frequent number in the array is -1
and it occurs 5
times.
Data Structures
Fundamentals
Similar Kata:
Stats:
Created | Nov 27, 2015 |
Published | Nov 27, 2015 |
Warriors Trained | 19969 |
Total Skips | 925 |
Total Code Submissions | 51114 |
Total Times Completed | 13719 |
JavaScript Completions | 4037 |
CoffeeScript Completions | 20 |
Ruby Completions | 1244 |
Python Completions | 4730 |
Haskell Completions | 211 |
Java Completions | 2127 |
C# Completions | 402 |
C++ Completions | 1651 |
Scala Completions | 18 |
C Completions | 26 |
Total Stars | 208 |
% of votes with a positive feedback rating | 91% of 1245 |
Total "Very Satisfied" Votes | 1052 |
Total "Somewhat Satisfied" Votes | 163 |
Total "Not Satisfied" Votes | 30 |