Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
my ($max, @current);
|
||||
sub non_continuous {
|
||||
my ($idx, $has_gap) = @_;
|
||||
my $found;
|
||||
|
||||
for ($idx .. $max) {
|
||||
push @current, $_;
|
||||
# print "@current\n" if $has_gap; # uncomment for huge output
|
||||
$found ++ if $has_gap;
|
||||
$found += non_continuous($_ + 1, $has_gap) if $_ < $max;
|
||||
pop @current;
|
||||
$has_gap = @current; # don't set gap flag if it's empty still
|
||||
}
|
||||
$found;
|
||||
}
|
||||
|
||||
$max = 20;
|
||||
print "found ", non_continuous(1), " sequences\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue