TikTok interview question

House Robber II on Leetcode