Not fully understand the question

  • 2

    along the parent-child connections

    meaning path can be either from parent to child or from child to parent, right? So the given example [1,2,3] returns 6 because 2->1->3 right?

    Any clarification will be appreciated.

  • 0

    it is the sum matters, not the sequence.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.