about | help | code help+videos | done | prefs |
Write a method that uses backtrack recursion to determine if the targetSum can be reached by adding any combination of digits from origNum. For example, wrapDigitSum(249, 11) returns true because 2+9=11. wrapDigitSum(249, 12) returns false because no combination of 2, 4, and 9 adds up to 12. Look at the test data for additional examples. wrapDigitSum(16, 4) → false wrapDigitSum(7, 7) → true wrapDigitSum(7, 1) → 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: 420
Copyright Nick Parlante 2017 - privacy