add some algorithm about trees