trend: binary tree c++ version