Goldman Sachs interview question

Subset of binary tree