← Goldman Sachs questions

Max sum of non-adjacent nodes in a binary tree

Filed under Goldman Sachs

Two problems. (1) Given a binary tree of node values, find the maximum sum of nodes such that no two chosen nodes are directly connected (parent and child). (2) Given a grid of costs, find the minimum…

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.