Cisco Interview Question

House robber from leetcode website