http://codingbat.com/prob/p199368

 

public boolean groupSum6(int start, int[] nums, int target) {
if( start >= nums.length){
return target==0;
}

if(nums[start]==6){

if( groupSum6(start+1, nums, target-nums[start]) ) return true;
}
else{
if(groupSum6(start+1, nums, target-nums[start])) return true;
if(groupSum6(start+1, nums, target)) return true;
}

return false;


}

相关文章:

  • 2022-01-01
  • 2022-01-21
  • 2021-09-10
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
猜你喜欢
  • 2021-11-22
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2021-08-22
  • 2022-02-07
  • 2021-11-15
相关资源
相似解决方案