greedy
math
tree