Help for this page

Select Code to Download


  1. or download this
        my $dist = ($start - $end + 1) % $max_length;
    
  2. or download this
        my $dist = dist($start, $end);
    
    ...
        # warpped range
        return $max_length - $start + 1 + $end;
    }