Demandbase Interview Question

House Robber Leetcode problem , one DFS graph question