Amazon interview question

House Robber problem for technical interview