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

 

Recursion-2 > groupSum5
prev  |  next  |  chance

Given an array of ints, is it possible to choose a group of some of the ints, such that the group sums to the given target with these additional constraints: all multiples of 5 in the array must be included in the group. If the value immediately following a multiple of 5 is 1, it must not be chosen. (No loops needed.)


groupSum5(0, [2, 5, 10, 4], 19) → true
groupSum5(0, [2, 5, 10, 4], 17) → true
groupSum5(0, [2, 5, 10, 4], 12) → false

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

public boolean groupSum5(int start, 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: 412.0

Copyright Nick Parlante 2017 - privacy