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

 

jebbert@volusia.k12.fl.us > quiz2022_03_01_SLHL_countDigits
prev  |  next  |  chance

Write a method that returns the number of times 'digit' appears as a digit in the array of integers 'nums'. Note that 'nums' can contain any integers including positive, negative, and zero. Look at the test data for examples.


quiz2022_03_01_SLHL_countDigits([], 7) → 0
quiz2022_03_01_SLHL_countDigits([4], 4) → 1
quiz2022_03_01_SLHL_countDigits([2222], 2) → 4

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

public int quiz2022_03_01_SLHL_countDigits(int[] nums, int digit) { }

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