Path Sum III
Medium · Trees · about 25 minutes
Asked at ByteDance, Amazon, Meta, Google, Microsoft.
Count the downward paths in a binary tree whose node values total targetSum. A path may begin at any node and stop at any node below it, but it must always move from parent to child.