@@ -0,0 +1,401 @@
+public class Solution %7B%0A    public int rob(int%5B%5D nums) %7B%0A        int n = nums.length;%0A        int%5B%5D cost = new int%5Bn+1%5D;%0A        int max = 0;%0A        for(int i=1; i%3C=n; i++) %7B%0A            if(i==1) cost%5Bi%5D = nums%5Bi-1%5D;%0A            else %7B%0A                cost%5Bi%5D = Math.max(cost%5Bi-1%5D, nums%5Bi-1%5D + cost%5Bi-2%5D);%0A            %7D%0A            max = Math.max(max, cost%5Bi%5D);%0A        %7D%0A        return max;%0A    %7D%0A%7D%0A

Create House_Robber.java