public int rob(int[] nums) {
		if (nums == null || nums.length == 0)
			return 0;
		int n = nums.length;
		if (n == 1)
			return nums[0];
		if (n == 2)
			return Math.max(nums[0], nums[1]);
		int[] ret = new int[n];
		ret[0] = nums[0];
		ret[1] = Math.max(nums[0], nums[1]);
		for (int i = 2; i < n; i++) {
			int cur = nums[i];
			ret[i] = Math.max(ret[i - 2] + cur, ret[i - 1]);
		}
		return ret[n - 1];
	}