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

 

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

Given an integer input parameter called origNum and an integer input parameter called target, is it possible to choose some group of digits from origNum, such that the group adds up to the given target? This is a classic backtracking recursion problem.


doItSumMPHG(82147, 22) → true
doItSumMPHG(50000, 7) → false
doItSumMPHG(502030, 10) → true

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

public boolean doItSumMPHG(int origNum, 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: 440

Copyright Nick Parlante 2017 - privacy