← Goldman Sachs questions

Find nodes with even and odd subtree sums on children

Filed under Goldman Sachs

Given a binary tree, find all nodes that have exactly two children such that one child's subtree sum is even and the other child's subtree sum is odd.

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.