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

 

andersoniii.edwin@cusd80.com > findTheFoursArrays
prev  |  next  |  chance

FindingThe4'sArray. Write the method that accepts an array of integers (list) and returns the count of the number of occurrences of "4". Be sure to check the array for length as if it is empty, return zero fours. Example: 12345678 would return 1.


findTheFoursArrays([1, 2, 3, 4, 5, 6, 7, 8]) → 1
findTheFoursArrays([4, 1, 4, 2, 4, 3, 4, 5]) → 4
findTheFoursArrays([3, 4, 3]) → 1

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

public int findTheFoursArrays(int[] list) { }

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: 110

Copyright Nick Parlante 2017 - privacy