CodeTop每日系列三题------------------2021.12.8
LC198. 打家劫舍//经典的动态规划的题目,dp的状态转移方程想出来了,但是dp没有初始化成功,还是不熟。class Solution { public int rob(int[] nums) { if(nums == null || nums.length == 0) return 0; if(nums.length == 1) return nums[0]; int[] dp = new int[nums.