Veeva Systems Interview Question

Questions about DP problems and trees