Given the root of a binary tree and a target sum, return the number of downward paths (going from any node to any of its descendants, moving only parent-to-child) whose values add up to the target. The input gives a level-order tree array and the target separated by ' | '.
Input: A level-order tree array and the target, separated by ' | '.
Output: Integer — the number of qualifying paths.
Input: [10,5,-3,3,2,null,11,3,-2,null,1] | 8
Output: 3
Explanation: Three downward paths sum to 8.Input: [1,2,3] | 3
Output: 2
Explanation: Paths 3 and 1->2.Input: [1] | 1
Output: 1
Explanation: Single-node path.0<=nodes<=1000-10^9<=value<=10^9-1000<=target<=1000