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

 

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

Write a method that accepts an integer called digits and an integer called targetSum. Use backtrack recursion to return true if it is possible to get the targetSum by adding up some of the digits from the integer called digits. Return false if it is NOT possible to do this.


foundTargetSum(734, 14) → true
foundTargetSum(67834, 28) → true
foundTargetSum(179, 10) → true

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

public boolean foundTargetSum(int digits, int targetSum) { }

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: 430

Copyright Nick Parlante 2017 - privacy