about | help | code help+videos | done | prefs |
APCS Recursion 2, Problem 9. Given an array of ints, test whether or not it is possible to choose a group of some of the ints, such that the group sums to the given target with this additional constraint: If a value in the array is chosen to be in the group, the value immediately following it in the array must not be chosen. (No loops!) R29_groupNoAdj(0, [2, 5, 10, 4], 12) → true R29_groupNoAdj(0, [2, 5, 10, 4], 14) → false R29_groupNoAdj(0, [2, 5, 10, 4], 7) → false ...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: 400 Post-solution available
Copyright Nick Parlante 2017 - privacy