Amazon Interview Question

House Robber from Leet Code