代码随想录算法训练营第五十天|198.打家劫舍 ● 213.打家劫舍II ● 337.打家劫舍III
198.打家劫舍方法1:introb(int*nums,intnumsSize){if(numsSize==0)return0;if(numsSize==1)returnnums[0];intdp[numsSize];memset(dp,0,numsSize);inti;dp[0]=nums[0];dp[1]=fmax(nums[0],nums[1]);for(i=2;ileft);noder=r