Bloomberg Interview Question

implement tree data structure