Hello, I am very new to the LeetCode community so go easy on me please! I would like some feedback on my approach. This is the textbook approach that I learned to use for approaching DP problems. How do you think an interviewer would react to something like this? Would they have preferred I did something a little more robust looking or would this be acceptable.
class Solution(object): def rob(self, nums): # 0 = Don't rob home # 1 = Rob home dpTable = [[0 for x in range(len(nums) + 1)], [0 for x in range(len(nums) + 1)] for i in range(1,len(nums) + 1): dpTable[i] = max(dpTable[i - 1], dpTable[i-1]) dpTable[i] = dpTable[i-1] + nums[i-1] return max(dpTable[len(nums)], dpTable[len(nums)])