in reply to Unique Character
We agree that there are 19 characters in the string... but your definition/usage of "unique" is indeed made very fuzzy when you say "I should get 19 characters total with 3 unique characters." I don't see how you get there:
arabic digit indicates instance of a char' "x" indicates no repetition/dupe (6); and roman numerals indicate distinct repeated chars (VI) AT THE FIRST +REPEAT my $str = "PERL MONKS ROCKS!!!"; P 1 x E 1 x R 1 I L 1 x 1 repeated later M 1 x O 1 repeated later N 1 x K 1 repeated later S 1 repeated later 2 II R 2 I O 2 III C 1 X K 2 IV S 2 V ! 1 VI ! 2 VI ! 3 VI
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unique Character
by Latnam (Novice) on Feb 02, 2014 at 03:42 UTC | |
by CountZero (Bishop) on Feb 02, 2014 at 08:55 UTC |