← Amazon questions

Largest subtree with equal T and F nodes

Filed under Amazon

In a binary tree where nodes contain only 'T' or 'F', find the size of the largest subtree that has an equal number of 'T' and 'F' nodes.

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 Amazon questions

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