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

Java > Recursion-2 > split53
prev  |  next  |  chance

Given an array of ints, is it possible to divide the ints into two groups, so that the sum of the two groups is the same, with these constraints: all the values that are multiple of 5 must be in one group, and all the values that are a multiple of 3 (and not a multiple of 5) must be in the other. (No loops needed.)

split53({1,1}) → true
split53({1, 1, 1}) → false
split53({2, 4, 2}) → true

...Save, Compile, Run

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  CodingBat  >  Recursion-2

Forget It! -- delete my code for this problem 424.0

Copyright Nick Parlante 2006-10 - privacy