groupSum6后向遍历

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;


}

MySQL限时解答,24小时内友哥专业解答
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指
原文地址:https://www.cnblogs.com/youge-OneSQL/p/6398939.html