    # @param {integer[]} nums
    # @return {integer}

    def rob(self, nums):
        if len(nums) == 1:
            return nums[0]

        def rob_util(nums):
            res1 = res2 = 0
            for n in nums: