Skip to content

Commit dcc27ed

Browse files
refactor 1339
1 parent 9048421 commit dcc27ed

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag
1010
|-----|----------------|---------------|--------|-------------|-------------
11-
|1343|[Maximum Product of Splitted Binary Tree](https://leetcode.com/problems/maximum-product-of-splitted-binary-tree/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1343.java) | |Medium||
1211
|1342|[Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1342.java) | |Easy|Bit Manipulation|
1312
|1341|[The K Weakest Rows in a Matrix](https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1341.java) | |Easy||
13+
|1339|[Maximum Product of Splitted Binary Tree](https://leetcode.com/problems/maximum-product-of-splitted-binary-tree/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1339.java) | |Medium|DP, Tree|
1414
|1338|[Reduce Array Size to The Half](https://leetcode.com/problems/reduce-array-size-to-the-half/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1338.java) | |Medium||
1515
|1337|[Remove Palindromic Subsequences](https://leetcode.com/problems/remove-palindromic-subsequences/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1337.java) | |Easy|String|
1616
|1333|[Filter Restaurants by Vegan-Friendly, Price and Distance](https://leetcode.com/problems/filter-restaurants-by-vegan-friendly-price-and-distance/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1333.java) | |Medium||

src/main/java/com/fishercoder/solutions/_1343.java renamed to src/main/java/com/fishercoder/solutions/_1339.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.Set;
77

88
/**
9-
* 1343. Maximum Product of Splitted Binary Tree
9+
* 1339. Maximum Product of Splitted Binary Tree
1010
*
1111
* Given a binary tree root. Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized.
1212
* Since the answer may be too large, return it modulo 10^9 + 7.
@@ -33,7 +33,7 @@
3333
* Each tree has at most 50000 nodes and at least 2 nodes.
3434
* Each node's value is between [1, 10000].
3535
* */
36-
public class _1343 {
36+
public class _1339 {
3737
public static class Solution1 {
3838
public int maxProduct(TreeNode root) {
3939
Set<Long> set = new HashSet<>();

src/test/java/com/fishercoder/_1343Test.java renamed to src/test/java/com/fishercoder/_1339Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
import com.fishercoder.common.classes.TreeNode;
44
import com.fishercoder.common.utils.TreeUtils;
5-
import com.fishercoder.solutions._1343;
5+
import com.fishercoder.solutions._1339;
66
import org.junit.BeforeClass;
77
import org.junit.Test;
88

99
import java.util.Arrays;
1010

1111
import static org.junit.Assert.assertEquals;
1212

13-
public class _1343Test {
14-
private static _1343.Solution1 solution1;
13+
public class _1339Test {
14+
private static _1339.Solution1 solution1;
1515
private static TreeNode root;
1616

1717
@BeforeClass
1818
public static void setup() {
19-
solution1 = new _1343.Solution1();
19+
solution1 = new _1339.Solution1();
2020
}
2121

2222
@Test

0 commit comments

Comments
 (0)