Skip to content

Resolving kata most frequent item in a collection.#145

Open
JoseTorrez wants to merge 1 commit intodevelopfrom
josetorrez_most_frequent_item_in_array
Open

Resolving kata most frequent item in a collection.#145
JoseTorrez wants to merge 1 commit intodevelopfrom
josetorrez_most_frequent_item_in_array

Conversation

@JoseTorrez
Copy link

No description provided.

@codecov-io
Copy link

codecov-io commented Sep 5, 2017

Codecov Report

Merging #145 into develop will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #145      +/-   ##
===========================================
+ Coverage      87.88%    88%   +0.12%     
- Complexity       466    472       +6     
===========================================
  Files            104    105       +1     
  Lines            999   1009      +10     
  Branches         165    169       +4     
===========================================
+ Hits             878    888      +10     
  Misses           106    106              
  Partials          15     15
Impacted Files Coverage Δ Complexity Δ
...va/org/fundacionjala/coding/jose/FrequentItem.java 100% <100%> (ø) 6 <6> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 227c0b0...8f9b287. Read the comment docs.

*/
public int mostFrequentItemCount(int[] collection) {
int most = 0;
for (int i = 0; i < collection.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a for each instead of a for loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants