← Goldman Sachs questions

House Robber problem on a binary tree

Filed under Goldman Sachs

Given a binary tree where each node represents a house with a specific property value, find the maximum amount of money a robber can loot without robbing two directly connected (parent-child) houses.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.