Oracle Interview Question

DP on Trees, Kadane algorithm