Pregunta de entrevista de NVIDIA

A leetcode hard type question involving trees with dynamic programming and memoization