Wayfair interview question

Code a Binary tree algorithm, review a code snippet for OOD principles