FlatBT is pretty trick, read bottomup solution
 Largerst subtree
stock problem