Skip to content

Commit 86aaefb

Browse files
add a comment for 2049
1 parent 8ef6cef commit 86aaefb

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

src/main/java/com/fishercoder/solutions/thirdthousand/_2049.java

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public int countHighestScoreNodes(int[] parents) {
4242
}
4343

4444
private Long computeScore(int nodeVal, Map<Integer, Long> nodeCountMap, Map<Integer, TreeNode> nodeValueMap) {
45+
//since this is a binary tree, so, at most, removing a node, it'll split the original tree into three disjoint trees
4546
TreeNode node = nodeValueMap.get(nodeVal);
4647
Long leftSubtree = 1L;
4748
Long rightSubtree = 1L;

0 commit comments

Comments
 (0)