← Goldman Sachs questions

Find subtree with equal number of 0s and 1s

Filed under Goldman Sachs

Given a binary tree consisting only of 0s and 1s, find if there is a subtree in which the number of 0s and 1s are equal.

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.