about | help | code help+videos | done | prefs |
numOccursOf4
Write a method to determine how many times the value 4 occurs in an array (int [] nums ). You will need to loop through all of the elements of the array. numOccursOf4([2, 3, 4, 4, 5]) → 2 numOccursOf4([1, 2]) → 0 numOccursOf4([3, 3, 4, 3, 3, 3]) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 201 Post-solution available
Copyright Nick Parlante 2017 - privacy