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

 

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

Write a method that returns true if there are an even number of 'target' numbers in the 'nums' array, and returns false otherwise. Note that having NO matches means there are ZERO matches, and zero is an even number, so you would return true in that case. Look at the test data for examples.


ppp1evenNumOf([4, 5, 7, 2, 2, 4, 6, 1], 2) → true
ppp1evenNumOf([6, 2, 3, 3, 3, 5, 0], 3) → false
ppp1evenNumOf([6, 2, 3, 3, 3, 5, 0], 5) → false

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

public boolean ppp1evenNumOf(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