Retired
Mode Count (retired)
56masudin
Description:
In statistic is known the term mode. The mode of a set of data values is the value that appears most often. For example suppose the set of data values are {1,2,2,3}. There are three number inside the data set: 1, 2, and 3. Number 1 appears once, 2 appears twice, and 3 appears once. That mean number 2 appears most often so the mode is 2.
Sometime we can find that the most often more than one number here the example
Data set = {2,2,2,3,3,3,4,5,6}
Mode result = {2,3}
In this Kata, your task is to make a function called int modeCount(int[] data)
that the parameter is an array of integer and the result is integer. The parameter is a set of data values that you will find the mode. The output is how many kind of mode. Here the example:
Data set = {2,2,2,3,3,3,4,5,6}
Mode result = {2,3}
mode Count = 2
Data set = {1,2,2,3}
Mode result = {2}
Mode Count = 1
Data set = {2,2,2,3,3,3,4,5,6,6,6}
Mode result = {2,3,6}
Mode Count = 3
Statistics
Algorithms
Similar Kata:
Stats:
Created | Oct 9, 2019 |
Warriors Trained | 155 |
Total Skips | 35 |
Total Code Submissions | 340 |
Total Times Completed | 56 |
Java Completions | 56 |
Total Stars | 0 |
% of votes with a positive feedback rating | 74% of 34 |
Total "Very Satisfied" Votes | 20 |
Total "Somewhat Satisfied" Votes | 10 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 36 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |