id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

dec16_2019_APP1SLHL_countNum


Write a method that returns the number of times the 'target' value appears in the array 'nums'. Look at the test data for examples.


dec16_2019_APP1SLHL_countNum([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], 7) → 0
dec16_2019_APP1SLHL_countNum([124, 3245, 42, 754], 754) → 1
dec16_2019_APP1SLHL_countNum([1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1], 1) → 3

...Save, Compile, Run (ctrl-enter)

public int dec16_2019_APP1SLHL_countNum(int[] nums, int target) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 290

Copyright Nick Parlante 2017 - privacy