Back to QuestionsPractice with This Question
Path Sum III (Path in Tree)
31.8K views•Asked at Google•
Hard
Question Explain
Given the root of a binary tree and an integer `targetSum`, return the number of paths where the sum of the values equals `targetSum`. The path does not need to start or end at the root or a leaf. Use a HashMap for efficient path tracking.
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.