Skip to content

Commit 9c91b17

Browse files
refactor 508
1 parent 91256fd commit 9c91b17

File tree

1 file changed

+0
-24
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-24
lines changed

src/main/java/com/fishercoder/solutions/_508.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,6 @@
99
import java.util.List;
1010
import java.util.Map;
1111

12-
/**
13-
* 508. Most Frequent Subtree Sum
14-
*
15-
* Given the root of a tree, you are asked to find the most frequent subtree sum.
16-
* The subtree sum of a node is defined as the sum of all the node values formed by the subtree rooted at that node (including the node itself).
17-
* So what is the most frequent subtree sum value? If there is a tie, return all the values with the highest frequency in any order.
18-
19-
Examples 1
20-
Input:
21-
5
22-
/ \
23-
2 -3
24-
return [2, -3, 4], since all the values happen only once, return all of them in any order.
25-
26-
Examples 2
27-
Input:
28-
29-
5
30-
/ \
31-
2 -5
32-
return [2], since 2 happens twice, however -5 only occur once.
33-
34-
Note: You may assume the sum of values in any subtree is in the range of 32-bit signed integer.
35-
*/
3612
public class _508 {
3713

3814
public static class Solution1 {

0 commit comments

Comments
 (0)