@@ -0,0 +1,592 @@
+class Solution(object):%0A    def rob(self, nums):%0A        %22%22%22%0A        :type nums: List%5Bint%5D%0A        :rtype: int%0A        %22%22%22%0A        if not nums:%0A            return 0%0A        if len(nums) == 1:%0A            return nums%5B0%5D%0A        %0A        def simple_rob(nums):%0A            if not nums:%0A                return 0%0A            rob_last, not_rob_last = 0, 0%0A            for num in nums:%0A                rob_last, not_rob_last = max(rob_last, not_rob_last + num), rob_last%0A            return max(rob_last, not_rob_last)%0A        %0A        return max(simple_rob(nums%5B1:%5D), simple_rob(nums%5B:-1%5D))%0A        

add house-robber-ii