About This Pattern
Master the Tree DFS / Prefix Sum pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.
Medium (1)
Path Sum III
Find number of paths that sum to a target value (path doesn't need to start at root).
Key Signals:
Prefix sumHash mapAll paths