Help for this page

Select Code to Download


  1. or download this
    my %count;
    ++$count{$_} foreach @c;
    ...
    my @pairs = grep { $count{$_} >= 2 } sort { $b <=> $a } @c;
    my @kind3 = grep { $count{$_} >= 3 } @pairs;
    my @kind4 = grep { $count{$_} >= 4 } @kind3;
    
  2. or download this
    @c = sort { $b <=> $a } @c;
    
    ...
       }
       $s = $e;
    }
    
  3. or download this
    @c = sort { $b <=> $a } @c;
    
    ...
    
    # Sort by length, then by highest.
    @runs = sort { @$b <=> @$a || $b->[0] <=> $a->[0] } @runs;