Skip to content

Commit

Permalink
Improve java perstistent tree (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
indy256 authored Jul 7, 2024
1 parent 54493ee commit f9513b9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions java/structures/PersistentTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ public static class Node {
Node(Node left, Node right) {
this.left = left;
this.right = right;
if (left != null)
sum += left.sum;
if (right != null)
sum += right.sum;
sum = left.sum + right.sum;
}
}

Expand Down

0 comments on commit f9513b9

Please sign in to comment.