7 kyu
Find Count of Most Frequent Item in an Array
4,037 of 13,715Fosna
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 | 19965 |
Total Skips | 925 |
Total Code Submissions | 51104 |
Total Times Completed | 13715 |
JavaScript Completions | 4037 |
CoffeeScript Completions | 20 |
Ruby Completions | 1244 |
Python Completions | 4728 |
Haskell Completions | 211 |
Java Completions | 2126 |
C# Completions | 402 |
C++ Completions | 1650 |
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 |