Pick a set of binary-tree nodes with the largest total value, never picking a node together with its parent. A tree-DP classic asked in Cohesity coding rounds.
Pick a set of binary-tree nodes with the largest total value, never picking a node together with its parent. A tree-DP classic asked in Cohesity coding rounds.
Opens with the full question.