Recursion

  • Empty tree has no path sum
  • A leaf node has path sum only if its value equals to the sum value
  • A node with children node could have a path sum when one/all of its children has a path sum sum - node.value .