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

 

simona1@sfusd.edu arrays4 > fourFours
prev  |  next  |  chance

Given an array of ints, return true if the value 4 appears in the array exactly 4 times


fourFours([4, 4, 1, 4, 7, 4, 7]) → true
fourFours([4, 1, 7, 4, 1, 7, 4]) → false
fourFours([7, 7, 1, 1, 7, 4, 4, 4, 4]) → true

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

public boolean fourFours(int[] nums) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy