Skip to content
Browse files

Faster counting

  • Loading branch information...
1 parent 33e5ba7 commit 42ec663847b2f426eb503ec3cc4fc4bcbd6be07d @hiratara committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 simpath.pl
View
4 simpath.pl
@@ -6,8 +6,8 @@
my $node = shift;
return 0 unless $node;
return 1 unless ref $node;
- count($node->{low}) + count($node->{high});
+ $node->{count} //= count($node->{low}) + count($node->{high});
}
-my $zdd = solve(6, 6);
+my $zdd = solve(9, 9);
print +(count $zdd), "\n";

0 comments on commit 42ec663

Please sign in to comment.
Something went wrong with that request. Please try again.