House Robber

Medium

📝 Description

Maximum money from non-adjacent houses

Input Format

Array of house money values

Output Format

Maximum loot

Constraints

1 ≤ nums.length ≤ 100

🔍 Sample Input

[2,7,9,3,1]
            

✅ Sample Output

12
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run