Oracle interview question

DP on Trees, Kadane algorithm