diff options
| author | E7-87-83 <fungcheokyin@gmail.com> | 2021-06-09 16:21:12 +0800 |
|---|---|---|
| committer | E7-87-83 <fungcheokyin@gmail.com> | 2021-06-09 16:21:12 +0800 |
| commit | c0e6f7597cc064e00bc42794780a55b424cfdba9 (patch) | |
| tree | 531f8174a2e595db1c94e6df8c3b4d69b1ec7a4c /challenge-116/abigail | |
| parent | d7f1a42f45701d5b0ed19ea0b9823d9dc41de271 (diff) | |
| parent | ef1528e9b9b1bee88fc5deaf724f31330b216d9a (diff) | |
| download | perlweeklychallenge-club-c0e6f7597cc064e00bc42794780a55b424cfdba9.tar.gz perlweeklychallenge-club-c0e6f7597cc064e00bc42794780a55b424cfdba9.tar.bz2 perlweeklychallenge-club-c0e6f7597cc064e00bc42794780a55b424cfdba9.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'challenge-116/abigail')
| -rw-r--r-- | challenge-116/abigail/README.md | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/challenge-116/abigail/README.md b/challenge-116/abigail/README.md new file mode 100644 index 0000000000..96adeb6d8f --- /dev/null +++ b/challenge-116/abigail/README.md @@ -0,0 +1,64 @@ +# Solutions by Abigail +## [String Chain](https://perlweeklychallenge.org/blog/perl-weekly-challenge-115/#TASK1) + +> You are given an array of strings. +> +> Write a script to find out if the given strings can be chained +> to form a circle. Print `1` if found otherwise `0`. +> +> > A string `$S` can be put before another string `$T` in circle +> > if the last character of `$S` is same as first character of `$T`. + +### Example +~~~~ +Input: @S = ("abc", "dea", "cd") +Output: 1 as we can form circle e.g. "abc", "cd", "dea". + +Input: @S = ("ade", "cbd", "fgh") +Output: 0 as we can't form circle. +~~~~ + +### Solutions +* [AWK](awk/ch-1.awk) +* [Bash](bash/ch-1.sh) +* [C](c/ch-1.c) +* [Lua](lua/ch-1.lua) +* [Node.js](node/ch-1.js) +* [Perl](perl/ch-1.pl) +* [Python](python/ch-1.py) +* [Ruby](ruby/ch-1.rb) + +### Blog +[String Chain](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-115-1.html) + +## [Largest Multiple](https://perlweeklychallenge.org/blog/perl-weekly-challenge-115/#TASK2) + +> You are given a list of positive integers `(0-9)`, single digit. +> +> Write a script to find the largest multiple of `2` that can be +> formed from the list. + +### Examples +~~~~ +Input: @N = (1, 0, 2, 6) +Output: 6210 + +Input: @N = (1, 4, 2, 8) +Output: 8412 + +Input: @N = (4, 1, 7, 6) +Output: 7614 +~~~~ + +### Solutions +* [AWK](awk/ch-2.awk) +* [Bash](bash/ch-2.sh) +* [C](c/ch-2.c) +* [Lua](lua/ch-2.lua) +* [Node.js](node/ch-2.js) +* [Perl](perl/ch-2.pl) +* [Python](python/ch-2.py) +* [Ruby](ruby/ch-2.rb) + +### Blog +[Largest Multiple](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-115-2.html) |
