Solve meeting and tree problems | Bloomberg Coding Question