Bloomberg interview question

implement tree data structure