We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90a1f79 commit 4d0f629Copy full SHA for 4d0f629
src/main/java/g0401_0500/s0437_path_sum_iii/Solution.java
@@ -5,6 +5,8 @@
5
6
import com_github_leetcode.TreeNode;
7
8
+import java.util.HashMap;
9
+
10
/*
11
* Definition for a binary tree node.
12
* public class TreeNode {
@@ -22,7 +24,7 @@
22
24
*/
23
25
public class Solution {
26
public int pathSum(TreeNode root, int targetSum) {
- Map<Long, Integer> h = new HashMap<>();
27
+ HashMap<Long, Integer> h = new HashMap<>();
28
return dfs(root, targetSum, h, 0L);
29
}
30
0 commit comments