For the test case `[1,1,1]`

, "Run Code" returns the answer 2 but "Submit Solution" returns the answer 0

```
/**
* @param {number[]} nums
* @return {number}
*/
var sMap = {};
var rob = function(nums) {
sMap[0] = 0;
sMap[1] = nums[0];
sMap[2] = Math.max(nums[0], nums[1]);
function findSol(m) {
if (sMap[m] !== undefined) {
return sMap[m];
}
sMap[m] = Math.max(findSol(m-2) + nums[m - 1], findSol(m-1));
return sMap[m];
}
return findSol(nums.length);
};
```