diff options
| author | Myoungjin JEON <jeongoon@gmail.com> | 2020-10-24 17:04:12 +1100 |
|---|---|---|
| committer | Myoungjin JEON <jeongoon@gmail.com> | 2020-10-24 17:04:12 +1100 |
| commit | 9e8f80f5637a9f00e17f6c831beaa1f647431c2d (patch) | |
| tree | b048066c67c3eab05990704c13b7ad6e252be660 | |
| parent | 5d9c329a473a4da9e0a4ec4692cbc8bfc68b40a6 (diff) | |
| download | perlweeklychallenge-club-9e8f80f5637a9f00e17f6c831beaa1f647431c2d.tar.gz perlweeklychallenge-club-9e8f80f5637a9f00e17f6c831beaa1f647431c2d.tar.bz2 perlweeklychallenge-club-9e8f80f5637a9f00e17f6c831beaa1f647431c2d.zip | |
[ch-083/jeongoon] ch-2.hs: update comments of Combinations.pm
| -rw-r--r-- | challenge-083/jeongoon/perl/CombinationsIndex.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/challenge-083/jeongoon/perl/CombinationsIndex.pm b/challenge-083/jeongoon/perl/CombinationsIndex.pm index 385c8905cd..9d04337229 100644 --- a/challenge-083/jeongoon/perl/CombinationsIndex.pm +++ b/challenge-083/jeongoon/perl/CombinationsIndex.pm @@ -66,7 +66,7 @@ sub combinationsIndex ( $$ ) { # set initial values ... { - # each finger can move to right number of ( M-N ) space(s). + # each cursor can move to right number of ( M-N ) space(s). @room = ( $M-$N ) x $N; @pos = 0 .. ($N - 1); $next_csr = $N - 1; # last cursor at rightmost @@ -102,14 +102,14 @@ sub combinationsIndex ( $$ ) { # $next_csr to last one @pos[ $next_csr .. ($N-1) ] = map { $pos[$next_csr] + $_ } 1 .. ($N-$next_csr); - # note: all these finger has same room when moved + # note: all these cursors have the same size of room when moved @room[ $next_csr .. ($N-1) ] = ( $room[ $next_csr ] - 1 ) x ($N-$next_csr); # and make a record push @result, [ @pos ]; - # next finger to move will be ($N-1) + # next cursor to move will be ($N-1) # or even if it is not next loop will find anohter $next_csr = ($N-1); |
