diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-05-20 04:51:56 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-05-20 04:51:56 +0100 |
| commit | 4d95d974bbcd05f1c596f482038732b4e865905d (patch) | |
| tree | daaec4eb5fc29c95697cde38c8ff6f177b7d10b0 /challenge-009/jaime/README | |
| parent | c498c83bd4fcaa56138931a0987149c1e63efe1f (diff) | |
| download | perlweeklychallenge-club-4d95d974bbcd05f1c596f482038732b4e865905d.tar.gz perlweeklychallenge-club-4d95d974bbcd05f1c596f482038732b4e865905d.tar.bz2 perlweeklychallenge-club-4d95d974bbcd05f1c596f482038732b4e865905d.zip | |
- Added template for Challenge 009.
Diffstat (limited to 'challenge-009/jaime/README')
| -rw-r--r-- | challenge-009/jaime/README | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/challenge-009/jaime/README b/challenge-009/jaime/README new file mode 100644 index 0000000000..46e62dafa4 --- /dev/null +++ b/challenge-009/jaime/README @@ -0,0 +1,23 @@ +Solution by Jaime Corchado, (@tortsnare)[https://twitter.com/tortsnare]. + +#Challenge #1 +Write a program which prints out all anagrams for a given word. + +## Solution +Lookup anagrams in a hash of Engligh words. + +The script does initialize a list of words from Webster's Second International dictionary, + but I removed any hyphenated or capitalized words. + +All words are keyed by alphabetical order. `join "", sort split //` +Words that are anagrams of one another share the same key. +Words that are not anagrams, do not share a key. + +The script reports the anagrams of its arguments by looking up all words that share the key. + +#Challenge #2 +Write a program to find the sequence of characters that has the most. + +## Solution +The English words are hashed as before. +The script tracks the key with the most additions. |
