aboutsummaryrefslogtreecommitdiff
path: root/challenge-113/abigail/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-113/abigail/README.md')
-rw-r--r--challenge-113/abigail/README.md76
1 files changed, 76 insertions, 0 deletions
diff --git a/challenge-113/abigail/README.md b/challenge-113/abigail/README.md
new file mode 100644
index 0000000000..4a8667ee09
--- /dev/null
+++ b/challenge-113/abigail/README.md
@@ -0,0 +1,76 @@
+# Solutions by Abigail
+## [Canonical Path](https://perlweeklychallenge.org/blog/perl-weekly-challenge-112/#TASK1)
+
+> You are given a string path, starting with a slash `/`.
+>
+> Write a script to convert the given absolute path to the simplified
+> canonical path.
+>
+> In a Unix-style file system:
+>
+> * A period `.` refers to the current directory.
+> * A double period `..` refers to the directory up a level.
+> * Multiple consecutive slashes (`//`) are treated as a single slash `/`.
+>
+> The canonical path format:
+>
+> * The path starts with a single slash `/`.
+> * Any two directories are separated by a single slash `/`.
+> * The path does not end with a trailing `/`.
+> * The path only contains the directories on the path from the root
+> directory to the target file or directory
+
+### Example
+~~~~
+Input: "/a/"
+Output: "/a"
+
+Input: "/a/b//c/"
+Output: "/a/b/c"
+
+Input: "/a/b/c/../.."
+Output: "/a"
+~~~~
+
+### 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
+[Perl Weekly Challenge 112: Canonical Path](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-112-1.html)
+
+## [Climb Stairs](https://perlweeklychallenge.org/blog/perl-weekly-challenge-112/#TASK2)
+
+> You are given `$n` steps to climb
+>
+> Write a script to find out the distinct ways to climb to the top.
+> You are allowed to climb either 1 or 2 steps at a time.
+
+### Notes
+This is just finding the `$n + 1` Fibonacci number.
+
+
+### Solutions
+* [AWK](awk/ch-2.awk)
+* [Bash](bash/ch-2.sh)
+* [Befunge-93](befunge-93/ch-2.bf93)
+* [C](c/ch-2.c)
+* [Go](go/ch-2.go)
+* [Java](java/ch-2.java)
+* [Lua](lua/ch-2.lua)
+* [Node.js](node/ch-2.js)
+* [Perl](perl/ch-2.pl)
+* [Pascal](pascal/ch-2.p)
+* [Python](python/ch-2.py)
+* [R](r/ch-2.r)
+* [Ruby](ruby/ch-2.rb)
+* [Scheme](scheme/ch-2.scm)
+
+### Blog
+[Perl Weekly Challenge 112: Climb Stairs](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-112-2.html)