aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Hoekstra <codereport@outlook.com>2021-12-28 17:27:05 -0500
committerConor Hoekstra <codereport@outlook.com>2021-12-28 17:27:05 -0500
commit7df6b030c57d6548a8c9456dfeb7f1d17d51489a (patch)
tree6b96568fa04dac471565e847656c9a6f4adb7a9a
parentc524a3754a9f0a685a84c2dfdeea58b36e85f512 (diff)
downloadperlweeklychallenge-club-7df6b030c57d6548a8c9456dfeb7f1d17d51489a.tar.gz
perlweeklychallenge-club-7df6b030c57d6548a8c9456dfeb7f1d17d51489a.tar.bz2
perlweeklychallenge-club-7df6b030c57d6548a8c9456dfeb7f1d17d51489a.zip
Week 145 Solution in APL & BQN
-rw-r--r--challenge-145/conor-hoekstra/ch-01.apl4
-rw-r--r--challenge-145/conor-hoekstra/ch-02.bqn9
2 files changed, 13 insertions, 0 deletions
diff --git a/challenge-145/conor-hoekstra/ch-01.apl b/challenge-145/conor-hoekstra/ch-01.apl
new file mode 100644
index 0000000000..e48168c64f
--- /dev/null
+++ b/challenge-145/conor-hoekstra/ch-01.apl
@@ -0,0 +1,4 @@
+dotProduct ← +.×
+
+⍝ Test
+1 2 3 dotProduct 4 5 6 ⍝ 32
diff --git a/challenge-145/conor-hoekstra/ch-02.bqn b/challenge-145/conor-hoekstra/ch-02.bqn
new file mode 100644
index 0000000000..7f2ffd35f8
--- /dev/null
+++ b/challenge-145/conor-hoekstra/ch-02.bqn
@@ -0,0 +1,9 @@
+PalindromicTree ← {1↓(⌽≡⊢)¨⊸/˜⍷∾´↑¨↓𝕩}
+
+# Tests
+PalindromicTree "redivider" # ⟨ "r" "redivider" "e" "edivide" "d" "divid" "i" "ivi" "v" ⟩
+PalindromicTree "deific" # ⟨ "d" "e" "i" "ifi" "f" "c" ⟩
+PalindromicTree "rotors" # ⟨ "r" "rotor" "o" "oto" "t" "s" ⟩
+PalindromicTree "challenge" # ⟨ "c" "h" "a" "l" "ll" "e" "n" "g" ⟩
+PalindromicTree "champion" # ⟨ "c" "h" "a" "m" "p" "i" "o" "n" ⟩
+PalindromicTree "christmas" # ⟨ "c" "h" "r" "i" "s" "t" "m" "a" ⟩